ENIGMATH - PLAY WITH MATH

题意翻译

给定 $a$ 和 $b$ ,求 $ax=by$ 中 $x$ 和 $y$ 的最小正整数解。

题目描述

You would have been fed up with competitive programming questions so far, now it is time to solve little math. Assume you have a equation A \* x - B \* y = 0 For a given value of **A** and **B**, find the minimum positive integer value of **x** and **y** that satisfies this equation.

输入输出格式

输入格式


First line contains **T**, number of test cases 0 <= **T** <=1000 followed by **T** lines. First line of each test case contains two space seperated integers **A** and **B**. 1 <= **A**, **B** <=1 000 000 000.

输出格式


For each test case, output a single line containing two integers **x** and **y** (seperated by a single space).

输入输出样例

输入样例 #1

1
2 3

输出样例 #1

3 2