Problem: 

Input

The input consists of a single string of uppercase letters A-Z. The length of the string is between 1 and 10 characters, inclusive.

Output

Output "YES" or "NO".

Examples

Input


GENIUS


Output


YES


Input


DOCTOR


Output


NO


Input


IRENE


Output


YES


Input


MARY


Output


NO


Input


SMARTPHONE


Output


NO


Input


REVOLVER


Output


YES


Input


HOLMES


Output


NO


Input


WATSON


Output


YES

Solution (in PYTHON3):

Solution:
elems = """Ac
Al
Am
Sb
Ar
As
At
Ba
Bk
Be
Bi
Bh
B
Br
Cd
Ca
Cf
C
Ce
Cs
Cl
Cr
Co
Cu
Cm
Ds
Db
Dy
Es
Er
Eu
Fm
F
Fr
Gd
Ga
Ge
Au
Hf
Hs
He
Ho
H
In
I
Ir
Fe
Kr
La
Lr
Pb
Li
Lu
Mg
Mn
Mt
Md
Hg
Mo
Nd
Ne
Np
Ni
Nb
N
No
Uuo
Os
O
Pd
P
Pt
Pu
Po
K
Pr
Pm
Pa
Ra
Rn
Re
Rh
Rg
Rb
Ru
Rf
Sm
Sc
Sg
Se
Si
Ag
Na
Sr
S
Ta
Tc
Te
Tb
Tl
Th
Tm
Sn
Ti
W
U
V
Xe
Yb
Y
Zn
Zr
Cn
Nh
Fl
Mc
Lv
Ts
Og""".upper().split("\n")
#print(elems)



def does_it_work(word):
    #print(word)
    if word == '': return True
    for x in elems:
        if word.startswith(x) and does_it_work(word[len(x):]):
            return True
    return False

print("YES" if does_it_work(input()) else "NO")