// Arup Guha
// 1/16/2017
// Solution to 2014 NAQ Problem F: Mixed Fractions

import java.util.*;

public class mixedfractions {

	public static void main(String[] args) {

		// Get first input.
		Scanner stdin = new Scanner(System.in);
		int n = stdin.nextInt();
		int d = stdin.nextInt();

		// Go through each case.
		while (n != 0 || d != 0) {

			// Output result.
			System.out.println( (n/d)+" "+ (n%d) + " / " + d);

			// Get next case.
			n = stdin.nextInt();
			d = stdin.nextInt();
		}
	}
}