#include using namespace std; #define ll long long const ll N=100000; ll T,p[N]; vectorv; int main(){ for(ll i=2;i=N)break; p[i*j]=1; if(i%j==0)break; } } for(cin>>T;T;T--){ ll a,b,k,i; cin>>a>>b; if(a