#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int n,a[100009],b,c,t;
cin>>t;
while(t--)
{
//for(b=1;b<=100;b++){for(c=b;c<=100;c++){cout<<b<<" "<<c<<endl;
for(long long int i=0;i<100009;i++)
a[i]=1;
cin>>b>>c;
for(long long int i=2;i<=(int)sqrt(c);i++)
for(long long int j=ceil(b/i)*i;j<=c;j=j+i)
if(i!=j)
a[j-b]=0;
int ctr=0;
for(long long int i=0,j=1;i<=c-b;i++)
if(a[i]==1&&i+b!=1)
{
ctr++;
cout<<i+b<<endl;
}
//cout<<"ctr "<<ctr<<endl;}}
}
}
i have tried my code for various test cases still can't find the point where i am doing wrong. please have a look at my code...