提交时间:2024-05-25 14:57:22

运行 ID: 148815

#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; if(n<=1) { cout<<"No"<<endl; return 0; } int man=sqrt(n); for (int i=2;i<=man;i++) { if(n%i==0){ cout<<"No"<<endl; return 0; } } cout<<"Yes"<<endl; return 0; }