AC:
#include<iostream> #include<cmath> using namespace std; int main() { int n; while(cin>>n) { if (n<2) cout<<"no"<<endl; else { int k=(int)sqrt(n*1.0); int i=0; for (i=2;i<=k;i++) if (n%i==0) break; if (i>k) cout<<"yes"<<endl; else cout<<"no"<<endl; } } return 0; }