Cantor Fractions#1022

Cantor Fractions

3 seconds
64 megabytes
Very easy

At the end of the nineteenth century, the German mathematician Georg Cantor claimed that the set of positive fractions \textbf{Q}^+ is equivalent to the set of natural numbers , meaning that both are infinite and have the same cardinality. To demonstrate this, he exhibited a mapping from to \textbf{Q}^+, which is illustrated for the \textbf{N} \times \textbf{N} plane below and covers all pairs of numbers:

The first fractions in the Cantor mapping are:

Write a program that finds the -th Cantor fraction according to the mapping described above.

Input

The input consists of several lines, each containing a single positive integer .

Output

The output should contain the same number of lines as the input. Each line must contain the -th Cantor fraction in the form "numerator/denominator", where the numerator and denominator are separated by a slash (). The fraction must not be reduced.

Examples

Example 1

Loading
Loading