

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 itertools import product
#from itertools import combinations
#from collections import Counter
#from collections import defaultdict
#from collections import deque # deque([iterable[, maxlen]])
#from bisect import bisect_left, bisect_right, insort # func(sortedlist, item)
#from sys import setrecursionlimit

from sys import stdin, stderr
input = stdin.readline

def dbp(*args, **kwargs): # calling with dbp(locals()) is perfectly cromulent
	print(*args, file=stderr, **kwargs)

def get_int_list():
	return [int(x) for x in input().strip().split()]

def do_thing():
	s = input().strip()
	alist = [ord(c) - ord('A') for c in s]

	for idx, a in enumerate(alist):
		if idx < 2:
			continue
		if (alist[idx-2] + alist[idx-1]) % 26 != a:
			return 'NO'
	return 'YES'

if __name__ == "__main__":
	print(do_thing())