import java.io.PrintWriter; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.math.BigInteger; import java.util.Scanner; public class EE { static Scanner in; static PrintWriter out; static String INPUT = ""; static void solve() { int n = ni(); BigInteger N = BigInteger.valueOf(n); for(Method m : BigInteger.class.getMethods()){ if(m.getName().startsWith("isP")){ try { if((Boolean)m.invoke(N, BigInteger.TEN.intValue())){ out.println("YES"); }else{ out.println("NO"); } } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | SecurityException e) { e.printStackTrace(); } break; } } } public static void main(String[] args) throws Exception { in = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(INPUT); out = new PrintWriter(System.out); solve(); out.flush(); } static int ni() { return Integer.parseInt(in.next()); } static long nl() { return Long.parseLong(in.next()); } static double nd() { return Double.parseDouble(in.next()); } }