#P16277. 「MierOI R1」Past
「MierOI R1」Past
Problem Description
Given a positive integer , determine whether there exist a palindromic number and a non-negative integer such that .
A non-negative integer is called a palindromic number if and only if it reads the same forwards and backwards.
Input Format
This problem contains multiple test cases.
The first line of the input contains a positive integer , indicating the number of test cases.
Then, the test cases follow sequentially. For each test case:
- One line containing a single positive integer .
Output Format
For each test case, output a single line:
- If there exist satisfying the condition, output
Yes. - If there do not exist satisfying the condition, output
No.
3
15
1022
58187
Yes
No
Yes
Hint
Explanation for Sample #1
For the first test case, we have , , and .
For the second test case, it can be proven that there do not exist satisfying the conditions.
For the third test case, we have , , and .
Data Range
This problem uses bundled subtasks.
For all test cases, it is guaranteed that and .
::cute-table{tuack}
| Subtask | Score | ||
|---|---|---|---|
| ^ | |||