include <iostream>
using namespace std;
int estePrim(int x) {
int prim=1, d=2;
while (d<=x/2) {
if (x%d==0) prim=0;
d = d+1;
}
return prim;
}
int main(){
unsigned n,i,d,OK, prim;
cout<<"n="; cin>>n;
if(n<=2) {
cout<<1;
return 0;
}
i = n-1;
while(i>0) {
if(estePrim(i) == 1) {
cout<<"Numarul "<<i<<" este prim si mai mic decat "<<n<<endl;
}
i--;
}
return 0;
}