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:
def solve(word):
  abc="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  cba=[i for i in range(len(abc))]
  hashed=dict(zip(abc,cba))
  hashed_2=dict(zip(cba,abc))
  word=list(word)
  if len(word)<3:
    print("YES")
    return
  w="".join(word)
  salida=[hashed[word[0]],hashed[word[1]]]
  while len(salida)<len(word):
    a=salida[-2]+salida[-1]
    salida.append(a%26)
  
  resp=""

  for i in salida:
    resp=resp+hashed_2[i]
  

  if resp==w:
    print("YES")
  else:
    print("NO")



W=input().strip()
solve(W)