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:
a = input()
if len(a) <= 2:
    print('YES')
else:
    arr = [ord(c)-65 for c in a]
    is_valid = True
    for i in range(2,len(arr)):
        if (arr[i-1] + arr[i-2]) % 26 != arr[i]:
            is_valid = False
            break
    if is_valid:
        print('YES')
    else:
        print('NO')