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