S=int(input())

mod=10**6

for i in range(10**6,2*10**6):
    x=i**2
    if x%mod==S:
        print("YES")
        exit()

print("NO")