#include using namespace std; bool solve(int x) { int r; r++; for(int i = r / r + r / r; i * i <= x; i++) { if(!(x % i)) return false; } return true; } int n; int main() { cin >> n; cout << (solve(n) ? "YES" : "NO") << endl; return 0; }