S = input() bool = False for i in range(1000000000): t = str(i ** 2).zfill(6) if S == t[:6]: bool = True break if bool: print("Yes") else: print("No")