Run ID:69962

提交时间:2024-04-12 20:15:25

#include <iostream> #include <cstdio> #include <cmath> using namespace std; bool op(int a){ for(int i=2;i<=sqrt(a);i++){ if(a%i==0){ return false;}} return true; } int main(){ int a,v=1; cin>>a; for(int i=2;i+2<=a;i++){ if(op(i)&&op(i+2)){ cout<<i<<" "<<i+2<<endl; v=0;} } if(v==1) cout<<"No"; return 0; }