import sys p = int(input()) lim = int(p**0.5) for i in range(p+1): for j in range(i, p+1): if p == i*i + j*j: print("Yes") sys.exit() else: print("No")