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:
elements = ['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']

def check(word):
    ans = False
    for element in elements:
        if word == element:
            return True
        l = len(element)
        if len(word) > l and word[0:l] == element:
            ans = ans or check(word[l:])
    return ans

w = input()
if check(w):
    print('YES')
else:
    print('NO')