Rain_w and Equation
题号:NC232085
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

Rain_w wants to solve some Equations. Firstly, Rain_w will give you an integer T, - the number of Equations. Then for the i-th equation, Rain_w will give you four integers a_i,b_i,c_i,d_i. She wants you to find two positive integers e_i,f_i, such that . As she doesn't like big integers, she hopes that e_i and f_iare not bigger than . Please help her!

输入描述:

The first line contains a single integer   -the number of equations.

Next T lines, the i-th line contains four integers  separated by space. It is guaranteed that . And it can be proved that the solutions satisfied the conditions are always existed.


输出描述:

The output should contains T lines. The i-th line should contains two integers   separated by space. If it has multiple solutions, you can print any of them.
示例1

输入

复制
3
1 1 1 2
1 2 3 4
19 26 8 17

输出

复制
3 1
10 5
470 381