import static java.lang.System.err; public class Main { public static void main(String[] args) { java.io.PrintWriter out = new java.io.PrintWriter(System.out); new Main(out); out.flush(); err.flush(); } public Main(java.io.PrintWriter out) { try (java.util.Scanner sc = new java.util.Scanner(System.in)) { long N = sc.nextLong(); for (long p = 2;p * p <= N;++ p) { if (N % p != 0) continue; while(N % p == 0) N /= p; if (N == 1) { out.println("Yes"); return; } cont: for (int j = 1;j <= 40;++ j) { long q = Math.round(Math.pow(N, 1.0 / j)); for (long k = 2;k * k <= q;++ k) { if (q % k == 0) continue cont; } long q2 = 1; for (int k = 1;k <= j;++ k) q2 *= q; if (q2 == N) { out.println("Yes"); return; } } break; } out.println("No"); } } }