#include<bits/stdc++.h>
using namespace std;
bool isprime(int i){
if(i<=1){
return false;
}
for(int j=3;j<=sqrt(i);j+=2){
if(i%j==0){
return false;
}
}
return true;
}
int main()
{
int m,n;
cin>>m>>n;
for(int i=m;i<n;i++){
if(i==2){
cout<<i<<" ";
}
else {
if(i%2 !=0 ){
if(isprime(i)==true){
cout<<i<<" ";
}
}
}
}
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmJvb2wgaXNwcmltZShpbnQgaSl7CglpZihpPD0xKXsKCQlyZXR1cm4gZmFsc2U7Cgl9Cglmb3IoaW50IGo9MztqPD1zcXJ0KGkpO2orPTIpewoJCWlmKGklaj09MCl7CgkJCXJldHVybiBmYWxzZTsKCQl9Cgl9CglyZXR1cm4gdHJ1ZTsKCn0KaW50IG1haW4oKQp7CglpbnQgbSxuOwoJY2luPj5tPj5uOwoJZm9yKGludCBpPW07aTxuO2krKyl7CgkJaWYoaT09Mil7CgkJCWNvdXQ8PGk8PCIgIjsKCQl9CgkJZWxzZSB7CgkJCWlmKGklMiAhPTAgKXsKCQkJCWlmKGlzcHJpbWUoaSk9PXRydWUpewoJCQkJCWNvdXQ8PGk8PCIgIjsKCQkJCX0KCQkJfQoJCX0KCX0KCXJldHVybiAwOwp9