Problem H: What kind of decimal number is it? #2

Problem H: What kind of decimal number is it? #2

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 0  Solved: 0
[Submit] [Status] [Web Board] [Creator:]

Description

All fractions can be converted into decimals. However, while converting 1/2 to a decimal results in a single decimal place like 0.5, converting 1/3 to a decimal requires an infinite number of decimal places like 0.3333333333333....
The former is called a finite decimal, and the latter is called an infinite decimal. Given a numerator and a denominator, write a program to determine whether converting this fraction to a decimal results in a finite decimal or an infinite decimal.

Input

First, the number of test cases T (1 <= T <= 50) is input. Then, the numerator A and denominator B are input for each test case. (1 <= A, B <= 100,000)

Output

For each test case, when converting the fraction to a decimal, output 'Limited' if it is a finite decimal and 'Unlimited' if it is an infinite decimal.

Sample Input Copy

4
1 3
15 30
123 100
1050 2401

Sample Output Copy

Unlimited
Limited
Limited
Unlimited