题目描述
Amy is a bright kid. She recently learnt the numbers from 0 to 9, and spends all her time these days, trying to write larger numbers. One day she wrote a number on a paper, and turned it upside down. It surprised and amazed her that the writing on the paper still made sense.
So, now she has created a game for herself, where she writes numbers and looks at them upside down to see if it still is valid. Help Amy in this game.
Input
For each of t testcases,
Given a number n, find if it is valid while being viewed upside down.
Output
If the number is valid print YES followed by the new number in the next line. Else print NO.
Constraints
1<=n<=10^50
1<=t<=1000
Example
Input:
2
1968086
12345678
Output:
YES
9808961
NO
输入格式
见题面
输出格式
见题面