F.cpp 256 B

1234567891011121314151617
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int isprime(int n)
  4. {
  5. for(int i=2;i<n;i++)
  6. if(n%i==0) return 0;
  7. return 1;
  8. }
  9. int main()
  10. {
  11. int n;
  12. cin>>n;
  13. if(isprime(n)==1) cout<<"yes"<<endl;
  14. else cout<<"no"<<endl;
  15. return 0;
  16. }