#include int zero; int two; bool isP(int n) { if (n < two) return false; for (int i = two; i * i <= n; ++i) { if (n % i == zero) return false; } return true; } signed main() { ++two; ++two; int n; std::cin >> n; std::cout << ((isP(n) ? "YES" : "NO")) << std::endl; return zero; }