提交时间:2025-06-29 10:37:45

运行 ID: 327820

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