#include <stdio.h>
long long G,L;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
scanf("%lld%lld",&G,&L);
if(L%G!=0)
printf("-1\n");
else
printf("%lld %lld\n",G,L);
}
return 0;
}
UVA 11388 GCD LCM
最新推荐文章于 2021-02-25 18:30:10 发布