#C8161. Palindromic Numbers
Palindromic Numbers
Palindromic Numbers
Given a list of numbers, determine for each number whether it is a palindromic number. A palindromic number is a number that remains the same when its digits are reversed. For example, 121 is palindromic while 123 is not. Print 'YES' if the number is palindromic and 'NO' otherwise.
Note: Each number will be non-negative.
inputFormat
The first line contains an integer t representing the number of test cases. The second line contains t space-separated integers.
outputFormat
For each number, output a single line with either 'YES' if the number is palindromic or 'NO' if it is not.## sample
5
121 123 1331 56765 987654321
YES
NO
YES
YES
NO
</p>