import java.math.BigInteger; import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; class Main { public static void main(String[] args) { new Main().run(); } void run() { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); if (N == 1) { System.out.println("NO"); return; } for (int i = 2; i < N; ++i) { if (N % i == BigInteger.ZERO.intValue()) { System.out.println("NO"); return; } } System.out.println("YES"); } void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }