Goal
An Egyptian fraction expresses a positive rational number as a sum of distinct unit fractions. A unit fraction takes the form 1/k for a positive integer k. One way to find such a representation is the Fibonacci–Sylvester greedy algorithm, which repeatedly chooses the largest unit fraction that does not exceed the remaining fraction.
For a fraction p/q (where 0 < p/q < 1), choose the unit fraction 1/ceil(q/p), subtract it from p/q, and reduce the remainder to its lowest terms using the greatest common divisor (GCD). Repeat until the remainder is a unit fraction.
To handle p/q ≥ 1, first greedily choose 1/1, 1/2, 1/3, and so on, stopping before the next unit fraction would make the sum exceed p/q. Then apply the algorithm stated above to the remaining fraction.
Given positive integers p and q, find the Egyptian fraction representation of p/q using this algorithm. Output the sum of unit fractions with denominators in ascending order.
Input
Line 1: The string p/q, where p and q are positive integers, separated by a slash character
Output
Line 1: The Egyptian fraction representation of p/q: 1/a + 1/b + ... in ascending order of denominators
The number 1 is represented as 1/1.
Constraints
For all initial and intermediate fractions p/q:
0 < p < 10^18
0 < q < 10^18
Example
Output
1/2 + 1/4 + 1/15 + 1/660