SHARE
TWEET

Untitled

a guest Dec 7th, 2019 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import math
  2.  
  3. a, b, c, d = map(int, input().split())
  4. ss = (2**a)*(3**b)*(5**c)*(7**d)
  5. #print(ss)
  6.  
  7. fact = [math.factorial(i) for i in range(100)]
  8. fact = fact[::-1]
  9.  
  10. for i in fact:
  11.     if ss % i == 0:
  12.         ss = ss//i
  13.         #print(ss)
  14.  
  15. if ss == 1:
  16.     print("YES")
  17. else:
  18.     print("NO")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top