Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

A GRE Themed Contest Problem

By biborno · 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

Samples

InputOutput
3
128 128
3 36
36 3
=
<
=

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


Discussion
Submit

Login to submit