x=int(input()) LIST=[] for i in range(10000123): if (i*i)%1000000==x%(1000000): LIST.append(i) for i in range(1000123): for l in LIST: y=l+i*1000000 if (y*y)%1000000000000==x: print("YES") exit() print("NO")