Difficulity：
N/A
| Test Data Sets: 1 (Hidden) | Judging:
Traditional Judge

Accepted : 0 Times | Submit :6 Times | Clicks : 442

Accepted ： 0 Users | Submit : 1 Users | Accepted rate : 0%

Time Limit ：10000 ms | Memory Limit : 64000 KBytes

Update : 2012-10-27 20:34

Accepted : 0 Times | Submit :6 Times | Clicks : 442

Accepted ： 0 Users | Submit : 1 Users | Accepted rate : 0%

Time Limit ：10000 ms | Memory Limit : 64000 KBytes

Update : 2012-10-27 20:34

The islanders do not like their ACM plant to grow too tall. So if any plant is of height K cm in the evening, the path (series of branches) from the root to any bud at height K would be pruned by physically removing the bud. When a bud is removed, the original leaf does not fall down and a new leaf still grows and falls every day, but no new branches would be coming from the bud.

For instance, an ACM plant of 3 days old and height at most 2 cm would grow like this:

- In the morning of the first day, 1 leaf falls down; two branches (one at height 1 cm called A and the other at height 0 cm called B) grow; two leaves grow on the buds of those two branches.
- In the morning of the second day, 2 leaves fall down; two branches A
_{h}and A_{v}grow from A; two branches B_{h}and B_{v}grow from B; four leaves grow on those branches; the vertical branch A_{v}from A is at height 2 and hence pruned. So there are only three active branches (A_{h}, B_{h}and B_{v}, with A_{h}and B_{v}at height 1). - In the morning of the third day, 4 leaves fall down; two branches grow from A
_{h}, B_{h }and B_{v}, respectively. The branches A_{h}-vertical and B_{v}-vertical are pruned.

In the morning of the fourth day, the leaves on A_{v}, A_{h}-vertical, A_{h}-horizontal, B_{h}-vertical, B_{h}-horizontal, B_{v}-vertical, B_{v}-horizontal will fall down. So there are 7 leaves. The islanders use those leaves in the following way. He first takes the leaves to a wizard. The wizard would grasp all the leaves on his hand. He first removes one leaf, and shouts "LUCKY!" Then, the wizard removes another leaf, and shouts "UNLUCKY!" The process continues until there are no leaves on his hand, and the last shout predicts the luckiness of the day. For instance, for the owner of an ACM plant with height at most 2 cm, it is his "LUCKY!" day because there are 7 leaves.

Given D, the day of gathering the leaves (D = 4 in the example above), and K, the maximum height of the plant (K = 2 in the example above), can you rapidly determine the luckiness of the day?

- The number of test cases would be smaller than or equal to 20.
- The day D for gathering the leaves would satisfy 1 D 10000.
- The maximum height K of the plant would satisfy 1 K 10000.

**
Input：**

The rst line of the input le contains an integer indicating the number of test cases to follow. Each test case contains two integers **D** and **K**, separated by spaces.

**
Output：**

For each test case, output LUCKY! in a line if it's a lucky day, and UNLUCKY! otherwise.

**
Sample Input：**

若題目沒有特別說明，則應該以多測資的方式讀取，若不知如何讀取請參考 a001 的範例程式。

2 4 2 4 3

**
Sample Output
：**

LUCKY! UNLUCKY!

**
Hint
：**

**
Author
：**

C |
C++ |
JAVA |
PASCAL |
---|---|---|---|

Program running time may be affected by various factors. Check server system environment information here