#K45632. Palindrome Number Checker
Palindrome Number Checker
Palindrome Number Checker
Given an integer n, determine whether it is a palindrome. An integer is a palindrome if it reads the same backward and forward. Note that negative numbers are not considered palindromes.
For instance, \(121\) is a palindrome while \(-121\) is not.
inputFormat
The first line contains an integer T, the number of test cases. Each of the next T lines contains a single integer n.
outputFormat
For each test case, output a single line containing "YES" if n is a palindrome, and "NO" otherwise.## sample
5
121
-121
12321
123
1
YES
NO
YES
NO
YES
</p>