Maximize It!#11319

Maximize It!

1 second
128 megabytes
Very easy

Given two integers and , find a real number such that the value of f(1/2 + a) is maximized. It is known that

f(t) = \min_{i,j \in \mathbb{Z}} \left| \frac{i}{n} - \frac{j}{m} + t \right|

It can be proven that the maximum value of the function is rational. Print this value in the form of an irreducible fraction.

Input

Contains no more than 10^4 test cases. Each test case consists of a single line containing two integers and m~(1 \le n, m \le 10^9).

Output

For each test case, print the maximum value of f(1/2 + a) in the form of an irreducible fraction , where q > 0.

Examples

In the first test case, a = 0 maximizes the function.

Example 1

Loading
Loading