Closest Fraction

Time limit: 2 seconds

Problem

You are required to find the closest fraction f for a given number 0 ≤ d ≤ 1 such that both nominator and denominator of f are between 0 and 10000. If tie, choose f with minimum value. If still have many solutions, choose one with minimum denominator.

Input

The input will consist of a series of decimal number 0 ≤ d ≤ 1 with 5 decimal places.

Output

Output a closest fraction according to problem description.

Sample Input

0.00000
1.00000
0.30103

Sample Output

0/1
1/1
2718/9029

Author

Stephan Lai