Limits 1s, 512 MB

Sadman and Najkin were solving a GRE math problem, Rejbah another friend of theirs listened to that problem and told them that this problem could be modified to be used as a contest problem. So, here is the modified problem.

Given, two integers X and K, determine whether the number of unique prime factors of K*X is greater than the number of unique prime factors of X. Easy enough? Go for it.

‘*’ denotes multiplication of number K and X

Input

The first line contains an integer T (1 ≤ T ≤ 105), denoting the number of test cases, for each test case two integers X and K are given, where X (X ≤ 1018) is positive integer and K (K ≤ 1018) is non-negative.

Output

For each test case print one of these:

  • <: if number of prime factors of X is less than number of prime factors of K*X
  • >: if number of prime factors of X is greater than number of prime factors of K*X
  • =: if number of prime factors of X is equal to number of prime factors of K*X

Sample

InputOutput
3
128 128
3 36
36 3
=
<
=

Special thanks to Md. Salman Estyak and Md. Ali Noor Jamil

Submit

Login to submit.

Statistics

64% Solution Ratio
PizzaLovers007Earliest, Sep '19
rayhan_labibFastest, 0.0s
FrdhsnLightest, 262 kB
mdvirusShortest, 256B
Toph uses cookies. By continuing you agree to our Cookie Policy.