def main(): s=input() for i in range(317,1000000): t=str(i*i) if s==t[len(t)-6:]: print("YES") exit() print("NO") main()