TOHU2 - Tohu again

no tags 

 

Tohu was very tired during the preparation for entrance exams at
MSU 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.

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

Output:
NO
  

Hint: Ksjuchi is not a magican. Really.

 

 


hide comments
adi_1996: 2016-06-26 08:45:06

space matters ;)

Vars: 2015-10-20 22:55:07

easy one :)... careful observation required !!!

(Tjandra Satria Gunawan)(曾毅昆): 2015-08-24 15:26:57

confusing problem description, I don't understand it, I should guess the task to get AC :(

vasayashwanth: 2015-07-11 14:33:09

note that whatever the character is for 99,it doesn't matter because any 2 digit integer minus its sum of digits will not be greater than 81......

Shrey: 2015-06-21 23:23:50

read the question very carefully and understand the exact condition for a yes. then a cakewalk ahead!

Abhinandan Agarwal: 2015-01-05 16:08:36

commited 1 of the most silly mistakes in life, bcoz of being in a hurry .. COst->2WA

Last edit: 2015-01-05 16:08:49
ash_cash: 2014-12-25 14:22:30

MY GOD!! 1 blunder mistake caused me 2 WA..

Anmol Pandey: 2014-10-24 13:53:33

Extremely Simple.But be careful!!

Hasil Sharma: 2013-07-28 12:43:21

My 100 th :) nice question

Vipul Pandey: 2013-07-18 18:27:05

if you understand when the output will be YES it will not take you more than 10 minutes to solve the problem. nice, simple and easy one.but a little bit tricky also.


Added by:Egor
Date:2011-06-19
Time limit:0.529s
Source limit:10000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:own problem