#include #include using namespace std; int zero, one; vector Eratosthenes(int Num) { vector p(Num, true); p[zero] = p[one] = false; for (int i = 0; i < Num; ++i)if (p[i]) for (int j = i << 1; j < Num; j += i)p[j] = false; return p; } int main() { one++; int n; cin >> n; auto p = Eratosthenes(1005); cout << (p[n] ? "YES" : "NO") << endl; }