Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Author: Kanan Asgarli
- https://www.e-olymp.com/az/problems/1616
- */
- #include <iostream>
- #include <cmath>
- using namespace std;
- int n;
- string prime(){
- for(int i = 2; i <= (int)sqrt(n); i++)
- if(n % i == 0)
- return "No";
- return "Yes";
- }
- int main()
- {
- cin>>n;
- cout<<prime()<<endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment