P = int(input()) i = 0 while i * i <= P: j = i + 1 while i * i + j * j <= P: if i * i + j * j == P: print("Yes") exit() j += 1 i += 1 print("No")