CF1613A.Long Comparison

传统题 时间 2000 ms 内存 256 MiB 4 尝试 1 已通过 1 标签

Long Comparison

Monocarp wrote down two numbers on a whiteboard. Both numbers follow a specific format: a positive integer xx with pp zeros appended to its end.

Now Monocarp asks you to compare these two numbers. Can you help him?

Input

The first line contains a single integer tt (1t1041 \le t \le 10^4) — the number of testcases.

The first line of each testcase contains two integers x1x_1 and p1p_1 (1x1106;0p11061 \le x_1 \le 10^6; 0 \le p_1 \le 10^6) — the description of the first number.

The second line of each testcase contains two integers x2x_2 and p2p_2 (1x2106;0p21061 \le x_2 \le 10^6; 0 \le p_2 \le 10^6) — the description of the second number.

Output

For each testcase print the result of the comparison of the given two numbers. If the first number is smaller than the second one, print '<'. If the first number is greater than the second one, print '>'. If they are equal, print '='.

Note

The comparisons in the example are: 20>1920 \gt 19, 1000=10001000 = 1000, 1999<20001999 \lt 2000, 1=11 = 1, 99<10099 \lt 100.

Samples

5
2 1
19 0
10 2
100 1
1999 0
2 3
1 0
1 0
99 0
1 2
>
=
<
=
<

在线编程 IDE

建议全屏模式获得最佳体验