#K626. Palindrome Checker

    ID: 31567 Type: Default 1000ms 256MiB

Palindrome Checker

Palindrome Checker

You are given a list of integers. For each integer, you need to determine whether it is a palindrome. A number is said to be a palindrome if it reads the same backward as forward. For example, 121 is a palindrome while 123 is not.

Note: If a number is a palindrome, output Yes; otherwise, output No.

The task is to implement a function that checks if a given number is a palindrome, and then process a list of such numbers accordingly.

The palindrome condition can be formally expressed in \( \LaTeX \) as:

[ \text{number} = d_0 d_1 \ldots d_{k} \quad \text{is a palindrome if} \quad d_i = d_{k-i} \quad \forall\ i \in {0, 1, \ldots, k} ]

inputFormat

The input is given via standard input (stdin) and consists of multiple lines:

  • The first line contains a positive integer n, which represents the number of integers.
  • Each of the following n lines contains a single integer.

outputFormat

For each integer from the input, print a line to standard output (stdout) containing Yes if the integer is a palindrome or No otherwise.

## sample
5
121
12321
123
1001
1221
Yes

Yes No Yes Yes

</p>