spoj#TOHU2. Tohu again
Tohu again
Tohu was very tired during the preparation for entrance exams at Moscow State University and Ksjuchi decided to joke on him (of course to cheer). She said him that she is magican and she can read his thoughts. To prove that she's prepeared some tables of characters where every character have an unique number more than 0 but less than 100. She shows one of tables to him and asked to make a two-digit integer, subtract from this number the sum of its digits and concentrate on symbol with this number from the table.
Then she calls the character of which he thinks.
Magic, is not it? =)
But Ksjuchi is preparing for the exam in philosophy now, and while she was drowing these tables noxious Socrates mixed up some of the cells. Now Ksjuchi need to know what tables she can use to surprise Tohu. Help her
Input
First line : number of tests T<=1000
Test:
99 lines where every have a type:
i ch where i = 1..99 included and "ch" - 'a'..'z' or 'A'..'Z'
Output
Print YES if Ksjuchi might uniquely define symbol that Tohu put forth.
Otherwise print NO
Example
Input: 1 1 k 2 q 3 J 4 Q 5 P 6 R 7 e 8 G 9 L 10 c 11 g 12 T 13 w 14 v 15 p 16 P 17 X 18 X 19 p 20 I 21 X 22 z 23 L 24 u 25 K 26 F 27 t 28 H 29 Q 30 r 31 V 32 e 33 F 34 V 35 D 36 u 37 c 38 n 39 z 40 w 41 Z 42 K 43 Y 44 j 45 Y 46 M 47 u 48 U 49 H 50 i 51 n 52 S 53 k 54 q 55 W 56 o 57 L 58 J 59 O 60 S 61 Z 62 G 63 m 64 T 65 P 66 k 67 i 68 b 69 J 70 a 71 E 72 g 73 O 74 P 75 M 76 s 77 M 78 A 79 O 80 P 81 g 82 h 83 V 84 U 85 M 86 G 87 Y 88 u 89 D 90 F 91 h 92 q 93 h 94 a 95 l 96 P 97 d 98 T 99 w</p>Output: NO
Hint: Ksjuchi is not a magican. Really.