#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
ll a, b, c, i;
while(cin >> c)
{
for(i=1;i<=c;i++)
{
cin >> a >> b;
if(b%a != 0)
cout << -1 << endl;
else
cout << a << " " << b << endl;
}
}
return 0;
}
Comments
Post a Comment