#include
using namespace std;
void PrintPrimes(int n){
int i,no;
for(i=2;no<=n;no=no+1){
// check if no. is prime or not
for(i=2;i<no;i=i+1){
if(no%i==0){
break;
}
}
if(i==no){
cout<<no<<"";
}
}
}
int main(){
int n;
cin>>n;
PrintPrimes(n);
cout<<endl;
PrintPrimes(n);
return 0;
}
it is not running check it please