시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB336413.793%

문제

Let us define Jacana numbers in the following way:

$$\begin{eqnarray*} J (n, 1) & = & n \text{,} \\ J (n, k) & = & n^{J (n, k - 1)} \text{ for $k > 1$.} \\ \end{eqnarray*} $$

We have two Jacana numbers: $J (n, a)$ and $J (m, b)$. Your task is to compare them.

입력

The first line of input contains an integer $T$, the number of test cases ($1 \le T \le 10^4$).

Each test case contains four integers: $n$, $a$, $m$, and $b$ ($1 \le n, a, m, b \le 10^9$).

출력

For each test case, print a single line containing a single character:

  • if $J (n, a) > J (m, b)$, output ">",
  • if $J (n, a) = J (m, b)$, output "="', and
  • if $J (n, a) < J (m, b)$, output "<".

예제 입력 1

3
2 2 3 1
2 3 3 2
1 2 1 4

예제 출력 1

>
<
=