第二个错误
import math T=int(input()) while T!=0: op=input() x,y=map(int,op.split()) b=(math.lcm(x,y)/math.gcd(x,y)) print(1,int(b),end=" ") print() T=T-1