#Lutece0506. 分数运算

分数运算

Migrated from Lutece 506 分数运算

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

读入44个整数aabbccdd和一个运算符(+-*/中的一个),进行分数ab\frac{a}{b}cd\frac{c}{d}的对应运算,输出最简结果。

Input

有多组测试数据。输入的第一行是整数TT(1T2001\leq T\leq 200),表示随后测试数据的组数。每组测试数据占一行,由一个四个正整数aa,bb,cc,dd和一个运算符组成,相邻数据间有一个空格。

Output

对应每组测试数据,输出分数运算的最简结果,占一行。具体可参照样例。

Samples

3
1 2 3 4 -
35 24 24 5 *
25 72 9 5 /
1/2-3/4=-1/4
35/24*24/5=7
25/72/9/5=125/648

Resources

wxiaoping