import java.util.Scanner;
/**
* HJ82 将真分数分解为埃及分数 - 中等
*/
public class HJ082 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
String str = sc.nextLine();
String[] input = str.split("/");
int a = Integer.parseInt(input[0]);
int b = Integer.parseInt(input[1]);
if (a > b || a < 1 || b < 2) {
break;
}
while (a != 1) {
if (b % a == 0) {
b = b / a;
a = 1;
continue;
}
if (b % (a - 1) == 0) {
System.out.print("1/" + b / (a - 1) + "+");
a = 1;
} else {
int c;
c = b / a + 1;
a = a - b % a;
b = b * c;
System.out.print("1/" + c + "+");
}
}
System.out.println("1/" + b);
}
sc.close();
}
}