Untitled
Anonymous
plain_text
10/30/2022 11:48 AM
348 B
21
Indexable
#include <iostream>
using namespace std;
int main()
{
int a,b,c,d;
cin >> a;
b = a;
d = 0;
while (b>2)
{
c = a;
b -= 1;
c %= b;
if (c==0)
{
d += 1;
}
}
if (d==0)
{
cout << "YES";
}
else {
cout << "NO";
}
}Editor is loading...