Sum of Digit is Palindrome or not

Write a program to check if the sum of digits of a given number N is a palindrome number or not.
Input:
The first line of the input contains T denoting the number of testcases. T testcases follow. Then each of the T lines contains single positive integer denoting the value of number.

Output:
For each testcase, in a new line, output “YES” if pallindrome else “NO“. (without the quotes)

Constraints:
1 <= T <= 200
1 <= N <= 1000

Example:
Input:
2
56
98
Output:
YES
NO


Leave a Reply

Your email address will not be published. Required fields are marked *