P = int(input()) pat = [] i = 1 while i ** 2 < P: pat.append(i ** 2) i += 1 patset = set(pat) for p in pat: if (P - p) in patset: print("Yes") break else: print("No")