#include
using namespace std;
bool is_prime(int num) {
if (num <= 1)
return false;
if (num <= 3)
return true;
if (num % 2 == 0 || num % 3 == 0)
return false;
for (int i = 5; i * i <= num; i += 6) {
if (num % i == 0 || num % (i + 2) == 0) {
return false;
}
}
return true;
}
int count_divisors(int num) {
int count = 0;
for (int i = 1; i <= num; ++i) {
if (num % i == 0) {
++count;
}
}
return count;
}
int main() {
int N;
cin >> N;
int K = count_divisors(N);
if (is_prime(K)) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return 0;
}