#include <iostream>
#include <cmath>
using namespace std;
int main(int argc, char* argv[])
{
long long a, b;
cin >> a >> b;
for(long long n = max(2LL, a); n <= b; n++)
{
int sqrt_n = (int)(0.1+sqrt((double)n));
bool prime = true;
for(int p=2; p<=sqrt_n; p++)
{
if(n%p==0)
{
prime = false;
break;
}
}
if(prime)
cout << n << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oaW50IGFyZ2MsIGNoYXIqIGFyZ3ZbXSkKewoJbG9uZyBsb25nIGEsIGI7CgljaW4gPj4gYSA+PiBiOwoJZm9yKGxvbmcgbG9uZyBuID0gbWF4KDJMTCwgYSk7IG4gPD0gYjsgbisrKQoJewoJCWludCBzcXJ0X24gPSAoaW50KSgwLjErc3FydCgoZG91YmxlKW4pKTsKCQlib29sIHByaW1lID0gdHJ1ZTsKCQlmb3IoaW50IHA9MjsgcDw9c3FydF9uOyBwKyspCgkJewoJCQlpZihuJXA9PTApCgkJCXsKCQkJCXByaW1lID0gZmFsc2U7CgkJCQlicmVhazsKCQkJfQoJCX0KCQlpZihwcmltZSkKCQkJY291dCA8PCBuIDw8IGVuZGw7Cgl9CglyZXR1cm4gMDsKfQo=