Nancy is in second grade and has just begun to learn about fractions. She's particularly intrigued by the fact that four eighths, two quarters and one half are all equal! However, because she isn't used to working with big numbers, she prefers that her fractions' numerators and denominators be expressed using the smallest numbers possible. Can you build a program Nancy can use to simplify her fractions?
Input
Each test case contains two integers , the numerator and denominator of a fraction, separated by a forward slash.
Output
For each test case, output the corresponding simplified fraction.
Sample Input
1/2
Sample Output
1/2
Sample Input
3/9
Sample Output
1/3
Comments