import math P = int(input()) p = math.isqrt(P) s = set([(i+1)**2 for i in range(p)]) for i in range(1, p+1): if i**2 > P: break if P-i**2 in s: print("Yes") exit() print("No")