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:
from sys  import stdin,stdout
from collections  import *
from math import gcd,ceil, floor
import math
st=lambda:list(stdin.readline().strip())
li=lambda:list(map(int,stdin.readline().split()))
mp=lambda:map(int,stdin.readline().split())
inp=lambda:int(stdin.readline())
pr=lambda n: stdout.write(str(n)+"\n")
 
mod=1000000007
INF=float('inf')
Y="YES"
N="NO"

def f(c): return ord(c)-ord('A')

def solve():
    s=input()
    s = [f(i) for i in s]
    A,B=False,False
    for i in range(2,len(s)):
        if (s[i-2]+s[i-1])%26!=s[i]:
            print(N)
            return

    print(Y)
    
        
            

for test in range(1):
    solve()