palindrom

Time limit: 0.5s Memory limit: 16MB Input: Output:

Task

You are given tt and tt non-negative integers. Find for each of the integers if they are palindrome or not.

An integer is palindrome if its writing from left to right is the same as its writing from right to left. For example, the numbers 88, 59955995, 101101 and 7696776967 are palindromes, but numbers 5934359343, 1912019120, 100100 or 35929233592923 are not palindromes.

Input data

The first line of the input will contain tt, the number of integers we will have to check. The next tt lines will contain the numbers for which we will have to check if they are palindromes or not.

Output data

The ithi^{th} line will have YES if the ithi^{th} value is a palindrome or NO otherwise.

Constraints and clarifications

  • 1≤t≤100 0001 \leq t \leq 100 \ 000;
  • The tt integers will be less or equal to 9 999 999 9999 \ 999 \ 999 \ 999.
  • For tests worth 6060 points, the tt integers will be less or equal to 999 999 999999 \ 999 \ 999.

Example

stdin

5
401
54345
99
102919201
58353

stdout

NO
YES
YES
YES
NO

Explanation

The right to left writings for the given numbers are 104104, 5434554345, 9999, 102919201102919201 and 3538335383.

Log in or sign up to be able to send submissions!