Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- main()
- {
- while (true)
- {
- int n, count = 0;
- cin >> n;
- if (n == 0)
- {
- break;
- }
- else
- {
- for (int i = 1; i <= n; i++)
- {
- if(n%i==0)
- {
- count++;
- }
- }
- if(count%2==0)
- {
- cout<<"NO"<<endl;
- }
- else
- {
- cout<<"YES"<<endl;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement