Number Reversal

Time limit1sMemory limit128 MB

Problem

For each test case, an integer N is given. Let R be the number made by reading the decimal digits of N in reverse order.

Determine whether N + R is a palindrome, meaning it reads the same from left to right and from right to left. Any leading zeros that appear after reversing are discarded when R is interpreted as an integer.

Input

The first line contains the number of test cases T. Each of the next T lines contains one integer N.

  • 10 <= N <= 100000

Output

For each test case, print YES if the sum of the original number and its reversed number is a palindrome. Otherwise, print NO.