#include using namespace std; int n, i; int main() { cin >> n; int p = n; p--; if (!p)cout << "NO" << endl; else { i++; i++; while ((n%i))i++; if (i == n)cout << "YES" << endl; else cout << "NO" << endl; } }