TOHU2 - 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 magician and she can read his thoughts. To prove that she's prepared 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 drawing 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

Ksjuchi is not a magician. Really.


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

hide comments
2011-09-13 11:59:59 Islam Khairy Moaz
when it gives out a YES ??
2011-07-07 18:45:14 sharan
any other test case for yes?

AC :)

Last edit: 2011-07-08 07:16:57
2011-07-01 20:22:32 Grandmaster
@shreya: they are case sensitive .. and order of number is maintained .. and how can there be any special test case :P

Last edit: 2011-07-01 20:23:24
2011-06-30 19:05:06 _____
getting WA, any special text case? the problem is very trivial.. but dont know where am I missing..

also are the letters case sensitive ?

[AC] :)

Last edit: 2011-06-30 19:16:12
2011-06-29 11:31:37 Grandmaster
a lowercase has to be treated different from uppercase????

yup .. uppercase != lowercase

Last edit: 2011-07-01 20:17:37
2011-06-27 19:25:49 Pritam Bhattacharya
really nice one .. enjoyed it ! :)
2011-06-23 14:16:59 Egor
When all symbols are equivalent =P
but it's one of variants
2011-06-21 10:22:36 ~
when will ans come yes??
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.