from random import randint from math import gcd def is_prime(x): j=0 while j<40: r=randint(2,x-1) if gcd(r,x)!=1: continue if pow(r,x-1,x)!=1: return False j+=1 return True def main(): N=int(input()) if is_prime(N): print("No") return if N==1: print("Yes") return i=2 while N>1: cnt=0 while N%i==0: N//=i cnt+=1 if cnt%3: print("No") return i+=1 print("Yes") return main()