import sys p = int(input()) i, j = [1, 1] while i*i <= p: while j*j <= p: if i*i + j*j == p: print("Yes") sys.exit() j += 1 i += 1 print("No")