P5315 Avatar Upload
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 $n$ avatars. Each avatar must be a square, and its side length must be at least $L \times L$.
Before an image is uploaded, the system processes it as follows: if any side length of the image exceeds $G$, the system will repeatedly halve both the width and height at the same time (rounding down) until both side lengths are $\leq G$.
Now you have found $n$ images that can be uploaded. The $i$-th image has size $W_i \times H_i$.
If any side of the image is less than $L$, 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, G$, with the meanings as described in the statement.
Each of the next lines contains two integers $W_i, H_i$, representing the width and height of the image.
Output Format
Output $n$ lines in total, each line containing one string, with the meanings as described in the statement.
Explanation/Hint
For $30\%$ of the testdata, $n = 1$.
For $100\%$ of the testdata, $n \leq 2000$ and $W_i, H_i, G \leq 10000$.
Translated by ChatGPT 5