Fraction Subtraction

Time limit1sMemory limit128 MB

Problem

In elementary school, students learn how to subtract fractions. However, one student does the subtraction the wrong way: they subtract the denominators from each other and the numerators from each other.

For example, consider the following subtraction.

$$\frac{5}{4} - \frac{9}{12}$$

The student subtracts denominator from denominator and numerator from numerator, computing it like this:

$$\frac{5}{4} - \frac{9}{12} = \frac{5 - 9}{4 - 12} = \frac{-4}{-8} = \frac{4}{8} = \frac{1}{2}$$

Surprisingly, there are cases where this incorrect method gives the same result as the correct subtraction.

Given a fraction $\frac{b}{n}$, write a program that finds every $a$ and $m$ satisfying the equation below, where $a \ge 0$ and $m > 0$.

$$\frac{a}{m} - \frac{b}{n} = \frac{a - b}{m - n}$$

Input

The input consists of several test cases. Each test case is a single line containing two integers $b$ and $n$. ($1 \le b, n \le 10^6$)

The last line of the input contains two zeros, and this line is not processed.

Output

For each test case, print on one line every fraction that satisfies the condition. Print the fractions in increasing order of value; if two fractions have the same value, print the one with the smaller numerator first.

Each fraction must be printed in the form a/m, with no spaces before or after the /. Print a single space between consecutive fractions on the same line.