

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
from os import path;import sys,time
mod = int(1e9 + 7)
from math import ceil, floor,gcd,log,log2 ,factorial,sqrt
from collections import defaultdict ,Counter , OrderedDict , deque;from itertools import combinations,permutations , groupby
# from string import ascii_lowercase ,ascii_uppercase
from bisect import *;from functools import reduce;from operator import mul;maxx = float('inf')
I = lambda :int(sys.stdin.buffer.readline())
lint = lambda :[int(x) for x in sys.stdin.buffer.readline().split()]
S = lambda: sys.stdin.readline().strip('\n')
localsys = 0
start_time = time.time()
#left shift --- num*(2**k) --(k - shift)
nCr = lambda n, r: reduce(mul, range(n - r + 1, n + 1), 1) // factorial(r)
def ceill(n,x):
    return (n+x -1 )//x
T =0
def solve():
    ar = [ord(i) - ord('A') for i in S()]
    for i in range(2 , len(ar)):
        if ar[i] != (ar[i-1] + ar[i-2])%26:
            return print('NO')
    return print('YES')

    # for i in range(n-1,-1,-1):
    #n^(n-i).p[i] --- maximum chahiye , so highest powers wala position pe maximum number 
    #1 5 2 4 3 -- 
    # d = {a[i] : i for i in range(n)}
    # b , idx, maxi  = a[:] , n , n 
    # end = n
    # for i in reversed(b):
    #     if d[maxi] < idx:
    #         for j in range(d[maxi] , end):
    #             print(a[j],end =' ')
    #         idx= d[maxi]
    #         maxi-=1
    #         end = idx
    #     else:
    #         maxi-=1
    # print()








    # n , m = map(int , input().split())
    # s = input().strip() ; t = input().strip()
    # i , l = 0 , []
    # for j in t:
    #     while s[i] != j:
    #         i+=1
    #     l.append(i)
    #     i+=1
    # # l --- calculating first of every character
    # i , r  = n-1  , []
    # for c in t[::-1] :
    #     while s[i] != c:
    #         i-=1
    #     r.append(i)
    #     i-=1
    # #r --- calculating last character of every character
    # print(max( j-i for i , j in zip(l , r[::-1][1:])))













    




                

            
        






def run():
    if (path.exists('input.txt')):
        sys.stdin=open('input.txt','r')
        sys.stdout=open('output.txt','w')
        localsys = 1


run()
T = I() if T else 1
for _ in range(T):
    solve()









if localsys:
    print("\n\nTime Elased :",time.time() - start_time,"seconds")

