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:
import math
from collections import defaultdict
from sys import stdin
#input=stdin.readline
s=input()
n=len(s)
if n<=2:
    print('YES')
else:
    f=1
    l=ord('A')
    p1,p2=ord(s[0])-l,ord(s[1])-l
    for i in range(2,n):
        if (p1+p2)%26==ord(s[i])-l:
            p1=p2
            p2=ord(s[i])-l
        else:
            f=0
            break
    if f:
        print('YES')
    else:
        print('NO')