FUCT_FOR_PALIN - Palindrome number

no tags 

Enter a positive number n. Is it a palindrome number?

Input

The first line of the input consist of a single integer number t which determines the number of tests.

In each of next t lines there is a single number n.

Constraints

  • 0 < t ≤ 1 000
  • 0 ≤ n < 1 000 000 000

Output

For each number n print out "YES" if n is palindrome number. Otherwise print out "NO".

Separate your answers with a new line character.

Note: ignore trailing zeros when determining whether n is a palindrome.

Example

Input:
8
19523
233332
859
11
819918000
10100
5252
23432

Output:
NO
YES
NO
YES
YES
YES
NO
YES

hide comments
jamesyang: 2023-06-29 22:22:05

You are supposed to ignore the trailing zeros so the output for 10100 should be "YES".
[Simes]: Confirmed, thank you! That's the sort of detail that really ought to be mentioned in the problem description. I'll add it.

Last edit: 2023-06-30 08:56:16
Simes: 2023-02-12 21:00:00

Is the test data broken? There have been no ACs since Aug 2022 for this easy problem.
(btw, I corrected the sample output for 819918000 and 10100.)


Added by:khanhvh
Date:2018-07-10
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:FPTU Can Tho