import java.util.*; import java.io.*; import java.math.*; public class Main{ public static BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); public static PrintWriter output = new PrintWriter(System.out); public static Scanner sc = new Scanner(System.in); public static final int INFI = Integer.MAX_VALUE; public static final long INFL = Long.MAX_VALUE; public static final int MOD = 1000000007; public static void main(String[] args) throws IOException{ StringTokenizer st; //st = new StringTokenizer(buff.readLine()); String S = sc.next(); boolean ok = false; for(long i=(long)1e6;i<=(long)1e7;i++) { String s = Long.toString(i*i); if(s.substring(7,s.length()).equals(S)) ok = true; } output.println(ok?"YES":"NO"); output.flush(); } }