#P1010. Pow
Pow
题目描述
As we all now that there's a easy way to describe some same consecutive factors multiply each other which is POW.
For example, and and it is easy to see that .
Now, your math teacher just gave you a problem in his class which is which one is bigger? There are many ways to solve that and you solved it quickly. When you told the answer to your teach, he seemed to be unsatisfactory about that and he continued to asked the pow problems like that, which is given four positive integers could you tell that which one is bigger between and or they are equal.
picture: some answers in the Internet
In C, you may use the function pow to calculate the answer: ```c++ pow(2,3)=8 pow(3,2)=9 ```输入格式
First line of the input contains one positive integer indicating the number of the test cases.
Next lines, each line contains four positive integers
输出格式
Four each test case: if print LEFT else if print EQUAL else print RIGHT
样例
3
3 2 2 3
100 99 99 100
2 4 4 2
LEFT
RIGHT
EQUAL