P12767 [HackerEarth] think 1
普及
题目描述

Rajesh has been challenge by his friend to find the number which have properties like,

Here take no 12 such that
square of 12(1212)=144
and 21 which is reverse of 12 have square(21
21)= 441 whose reverse is equal to 144

and now Rajesh is not getting any way how to solve the problem.So he makes a list of the number and need your help to tell whether a reverse number exist for that or not,

'T' test case and 'N' number.
0<T>50
0<N>10000

INPUT
The first line of input will be 'T' test case,follow by 'T' numbers

OUTPUT
If reverse number exist for that print that number or otherwise print No.

SAMPLE INPUT
2
12
11

SAMPLE OUTPUT
21
No

Explanation

You have to print the number if the reverse number exist otherwise print No
First number is 12 for this the reverse no is 21 whose square's reverse= square of 12
Second number is 11 for which no such number exist so print N0

输入格式

见题面

输出格式

见题面

样例输入
2 12 11 SAMPLE
样例输出
21 No