Jacana Numbers

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

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)J (n, a) and J(m,b)J (m, b). Your task is to compare them.

입력

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

Each test case contains four integers: nn, aa, mm, and bb (1n,a,m,b1091 \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)J (n, a) > J (m, b), output ">",
  • if J(n,a)=J(m,b)J (n, a) = J (m, b), output "="', and
  • if J(n,a)<J(m,b)J (n, a) < J (m, b), output "<".