#include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define inf 1e18
const int mod=1e9+7;
void solve(){
int n,m;
cin>>n>>m;
if(m%n) cout<<-1<<endl;
else{
cout<<n<<" "<<m<<endl;
}
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int tt=1;
cin>>tt;
while(tt--) solve();
return 0;
}
小蓝的疑惑(思维&数学)--牛客小白月赛84-B
最新推荐文章于 2024-05-30 16:17:47 发布