Description
Given several fractions, compute their sum and express the answer in the simplest fraction form. Input
There are many test cases in one subtask.
The first line of each test case contains an integer t, which indicates the number of fractions in the input. Each of the following t lines contains two integers a and b, which represent the numerator and the denominator of a fraction.
subtask 1 : t=2. 1<=a,b<=10. subtask 2 : t<=5. 1<=a,b<=10. subtask 3 : t<=5. 1<=a,b<=50. subtask 4 : t<=10. 1<=a,b<=100. Output
Each test case outputs one line.
The output is the sum reduced to the simplest fraction form. You need to print a '/' between the numerator and the denominator.