Untitled

mail@pastecode.io avatar
unknown
plain_text
11 days ago
345 B
1
Indexable
Never
#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