import java.util.Scanner;

public class FractionSum {
    public static void main(String[] args) {
        int sn = 0;
        int sd = 1;

        Scanner in = new Scanner(System.in);

        while (true) {
            int n = in.nextInt();
            int d = in.nextInt();

            if (n == 0 && d == 0) break;

            // Calculate sn and dn correctly
            sn = ; // RHS is BLANK_0
            sd = ; // RHS is BLANK_1
        }
        
        System.out.println(sn + "/" + sd);
    }
}