You are writing the part of a basic math tutor that prints a fraction as a mixed number.
A proper fraction has a numerator smaller than its denominator. A mixed number splits off the whole part and writes what is left as a proper fraction. For a fraction with numerator n and denominator d, the whole part is the quotient q=⌊n/d⌋ and the numerator of the leftover fraction is the remainder r=nmodd. For example, 27/12 becomes the whole part 2 and the proper fraction 3/12.
Do not reduce the fraction. Printing 1/4 in place of 3/12 is wrong.
The input has several lines, and each line is one test case. Each line holds two integers separated by a space. The first is the numerator n and the second is the denominator d. Both are between 1 and 231−1.
Input ends on the line 0 0. That line is not a test case, so do not process it.
For each test case, print the mixed number on one line. Print the whole part, the numerator of the leftover fraction, the character /, and the denominator, in that order, separated by single spaces.
Print a whole part of 0 or a remainder of 0 as it is. For numerator 3 and denominator 4000, print 0 3 / 4000. For numerator 2460000 and denominator 98400, print 25 0 / 98400.