Given two fractions a/b and c/d, compare them and print the larger of the two.

**Input:**

The first line of the input contains a single integer T, denoting the number of test cases. Then T test case follows. Each testcase contains a single line having a/b and c/d as input. a/b and c/d are separated by a comma and a space.

**Ouput:**

Print the fraction that is greater. If they are equal, then print "equal" without the quotes.

**Constraints:**

1<=T<=100

0<=a,c<=1000

1<=b,d<=1000

**Example:**

**Input:**

3

5/6, 11/45

8/1, 8/1

2/3, 2/2

**Output:**

5/6

equal

2/2

**Explanation:**

For testcase1: 5/6=0.8333... and 11/45=0.2444.... Clearly, 5/6 is greater, so we output it.

For testcase 2: We can see that both the fractions are same, so they are equal.

For testcase 3: 2/3=0.666... and 2/2=1, So, clearly, 2/2 is greater.

Author: Soul_xhacker

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

jhasaurabh312 | 138 |

Aaaaarohiiii | 136 |

Harsha_kunchala | 128 |

tushki | 124 |

RajaRajput | 117 |

ARUN_PUNDIR | 617 |

manishgupta8497 | 607 |

Abhimanyu_kumar | 559 |

KhyatiSoneji | 501 |

Aman___Jain | 496 |

blackshadows | 5335 |

Ibrahim Nash | 5223 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4567 |

Login to report an issue on this page.