Untitled
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { int main() { long long n, ans = 0; cin >> n; for (int i = 1; i <= sqrt (n); i++) { if (n % i == 0) ans = ans + 2; if (i * i == 0) ans--; } if (ans == 2 && n > 1) cout << "YES"; else cout << "NO"; } }
Leave a Comment