Given an integer N, check if it is a palindrome or not. If it is not a palindrome, print NO. If it is a palindrome, print YES. If it is an even palindrome, print the ratio of first half to second half, up to the precision of 2 decimal places. If it is an odd palindrome, print the sum of the digits.

Constraints:

First line consist of number of test cases ‘t’.Each of the next t lines contain an integer N.
Given:

0 ≤ N ≤ 10^15

0<t<100

Sample Input:

1234321

89088098

780

Sample Output:

YES 16

YES 1.10

NO

Leave a Reply