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:
els = ["AC","AG","AL","AM","AR","AS","AT","AU","B","BA","BE","BH","BI","BK","BR","C","CA","CD","CE","CF","CL","CM","CN","CO","CR","CS","CU","DB","DS","DY","ER","ES","EU","F","FE","FL","FM","FR","GA","GD","GE","H","HE","HF","HG","HO","HS","I","IN","IR","K","KR","LA","LI","LR","LU","LV","MC","MD","MG","MN","MO","MT","N","NA","NB","ND","NE","NH","NI","NO","NP","O","OG","OS","P","PA","PB","PD","PM","PO","PR","PT","PU","RA","RB","RE","RF","RG","RH","RN","RU","S","SB","SC","SE","SG","SI","SM","SN","SR","TA","TB","TC","TE","TH","TI","TL","TM","TS","U","V","W","XE","Y","YB","ZN","ZR"]
s = input()
 
def f(t):
    if t == "":
        return True
    for p in els:
        if t.startswith(p) and f(t[len(p):]):
            return True
    return False
    
if f(s):
    print("YES")
else:
    print("NO")