#include<iostream>
#include<array>
#include<algorithm>
#include<cmath>
#define reg register
using namespace std;
using gg=long long;
inline gg gcd(const gg &a,const gg &b)
{
return b==0?a:gcd(b,a%b);
}
int main()
{
freopen("math.in","r",stdin);
freopen("math.out","w",stdout);
ios::sync_with_stdio(false);
cin.tie(0);
reg bool flag=false;
reg gg t,x,z;
cin>>t;
for(reg gg i=1;i<=t;i++)
{
cin>>x>>z;
if(z%x!=0)
{
cout<<-1<<'\n';
}
else
{
cout<<-1<<'\n';
}
}
return 0;
}
如题