#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
int t;
int G, L;
scanf("%d", &t);
while(t--)
{
scanf("%d%d", &G, &L);
if(L%G==0)
printf("%d %d\n", G, L);
else
printf("-1\n");
}
}
No comments:
Post a Comment