Problem H. GCD & LCM Inverse
时间限制 2000 ms
内存限制 64 MB
Given two positive integers a and b, we can easily calculate the greatest common divisor (GCD) and the least common multiple (LCM) of a and b. But what about the inverse? That is: given GCD and LCM, finding a and b.
输入数据
输出数据
For each test case, output a and b in ascending order. If there are multiple solutions, output the pair with smallest a + b.
样例输入
样例输出
$ Mathjax font initiator $