EditorialFor positive integers A,BA,BA,B, gcd(A,B)⋅lcm(A,B)=AB.\gcd(A,B)\cdot\operatorname{lcm}(A,B)=AB.gcd(A,B)⋅lcm(A,B)=AB. Simply output A×BA\times BA×B. The time and space complexity per test case is O(1)O(1)O(1).ProofWrite g=gcd(A,B)g=\gcd(A,B)g=gcd(A,B), A=gxA=gxA=gx, and B=gyB=gyB=. Since are coprime, the least common multiple is , so the product is .