#K94992. Palindromic Number Checker
Palindromic Number Checker
Palindromic Number Checker
A number is said to be a palindrome if it reads the same backward as forward. In mathematical terms, a number ( n ) is a palindrome if
[ n = \text{reverse}(n) ]
Your task is to determine whether each number provided as input is a palindrome. For each test case, output "YES" if the number is a palindrome, and "NO" otherwise.
inputFormat
Input is read from standard input. The first line contains an integer ( T ), representing the number of test cases. This is followed by ( T ) lines, each containing a single integer. For example:
3 121 123 111
represents 3 test cases with the numbers 121, 123, and 111.
outputFormat
For each test case, output "YES" if the number is a palindrome, otherwise output "NO". Each output should be printed on a new line.## sample
3
121
123
111
YES
NO
YES
</p>