#include #include #include using namespace std; typedef long long ll; int main() { ll l, h, an=-1, an2=-1; cin >> l >> h; int hh=sqrt(h); bool ip[hh+1]; fill(ip, ip+hh+1, false); ip[0] = ip[1] = true; for(int i=2; i<=hh; i++) { if (ip[i]) continue; for(int j=2*i; j<=hh; j+=i) ip[j]=true; } for(ll i=2; i*i<=h; i++) { if (ip[i]) continue; if (l <= i*i) l = i*i, an=i, an2=i*i; } //cout << l << " " << h << endl; for(ll i=l; i<=h; i++) { //if (i%10000==0) cout<