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:
word = list (input())
n = len (word)

alphabet=list ('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
alphabet_dict = {}
for i in range (26):
    alphabet_dict [alphabet[i] ]=i

early_exit = False
for i in range (n-2):
    x = alphabet_dict[word[i]]
    y = alphabet_dict[word[i+1]]
    z = alphabet_dict[word[i+2]]
    if  (x+y)%26 != z:
        early_exit=True
        break

print ('NO' if early_exit else 'YES' )