P = int(input()) f = 0 for i in range(1, P+1): if i ** 2 > P or f == 1: break for j in range(i, P+1): if i ** 2 + j ** 2 == P: f = 1 break if f: print("Yes") else: print("No")