#include<stdio.h>
int main()
{
long int n,m,t;
scanf("%ld",&t);
while(t--)
{
scanf("%ld%ld",&m,&n);
if(n%m==0)
printf("%ld %ld\n",m,n);
else
printf("-1\n");
}
return 0;
}
int main()
{
long int n,m,t;
scanf("%ld",&t);
while(t--)
{
scanf("%ld%ld",&m,&n);
if(n%m==0)
printf("%ld %ld\n",m,n);
else
printf("-1\n");
}
return 0;
}
No comments:
Post a Comment