[提交][状态][讨论版]

## 题目描述

Problem Description

When Euclid invented his Euclid Algorithm to calculate the greatest common divisor of two integers, he also wanted to solve a more complex problem of greatest common  fractional divisor(GCFD).

That is to say, You will be given two fractions. Please find the largest fraction which can be divided by both of the two fractions.

## 输入

The first line contains an integer T (T <= 100) indicating the number of test cases.

For each test case, there are one line contains two fractions described by standard form. The standard form is "numerater/denominator" and GCD(numerater,denominator) is equal to 1. For example, 2/1, 4/3 are in standard form.

(0 < numerater <= 1000, 0 < denominator <= 1000)

## 输出

For each test case, please output one line of the GCFD in standard form.

## 样例输入

2
1/2 1/3
7/2 21/4


## 样例输出

1/6
7/4


[提交][状态][讨论版]