Simple equation#563

Simple equation

1 second
128 megabytes
Very easy

Peter found in a book a simple mathematical equation: a \cdot x + b \cdot y = 1.

His interest is only in integral solutions of this equation, and only those for which x \geq 0. Help Peter to find them.

Input

The first line contains the number of test cases (0 < t < 21). Each of the next lines contains two integers and (0 \leq a, b \leq 2^{31}).

Output

For each test case, print on a separate line one solution: the smallest possible non-negative value of and the corresponding integer value of . In case there is no solution, print No Solution.

Examples

Example 1

Loading
Loading