#P5315. 头像上传

头像上传

Description

One day, out of boredom, you register on a boring website. The first step after registration is naturally to upload an avatar.

You find that this website allows you to upload a total of nn avatars. Each avatar must be a square, and its side length must be at least L×LL \times L.

Before an image is uploaded, the system processes it as follows: if any side length of the image exceeds GG, the system will repeatedly halve both the width and height at the same time (rounding down) until both side lengths are G\leq G.

Now you have found nn images that can be uploaded. The ii-th image has size Wi×HiW_i \times H_i.

If any side of the image is less than LL, output "Too Young".

If the image meets the size requirement but is not a square, output "Too Simple".

If the image meets the size requirement and is a square, output "Sometimes Naive".

All the above strings should be printed without quotes.

Input Format

One line contains three integers n,L,Gn, L, G, with the meanings as described in the statement.

Each of the next lines contains two integers Wi,HiW_i, H_i, representing the width and height of the image.

Output Format

Output nn lines in total, each line containing one string, with the meanings as described in the statement.

3 5 10
12 3
7 8
5 5

Too Young
Too Simple
Sometimes Naive

Hint

For 30%30\% of the testdata, n=1n = 1.

For 100%100\% of the testdata, n2000n \leq 2000 and Wi,Hi,G10000W_i, H_i, G \leq 10000.

Translated by ChatGPT 5