#t277. Cantor表

Cantor表

Cantor's Table

Problem Background

Special for beginners, ^_^

Problem Description

One of the famous proofs in modern mathematics is Georg Cantor's proof that the rational numbers are enumerable. He proved this proposition using the following table:

We number each entry of the above table in a zigzag (Z-shaped) order. The first entry is 1/11/1, then 1/21/2, 2/12/1, 3/13/1, 2/22/2, and so on.

Given NN, find the NN-th entry of the table.

Input Format

One integer NN (1≤N≤1071 \le N \le 10^7).

Output Format

A fraction, the NN-th entry of the table.

Sample Input

7

Sample Output

1/4

Constraints

Time limit: 1s, memory limit: 1024KiB for each test case.