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:
elements = [
	'AC','AG','AL','AM','AR','AS','AT','AU','B','BA','BE','BH','BI',
	'BK','BR','C','CA','CD','CE','CF','CL','CM','CN','CO','CR','CS',
	'CU','DB','DS','DY','ER','ES','EU','F','FE','FL','FM','FR','GA',
	'GD','GE','H','HE','HF','HG','HO','HS','I','IN','IR','K','KR',
	'LA','LI','LR','LU','LV','MC','MD','MG','MN','MO','MT','N','NA',
	'NB','ND','NE','NH','NI','NO','NP','O','OG','OS','P','PA','PB','PD',
	'PM','PO','PR','PT','PU','RA','RB','RE','RF','RG','RH','RN','RU','S',
	'SB','SC','SE','SG','SI','SM','SN','SR','TA','TB','TC','TE','TH','TI',
	'TL','TM','TS','U','V','W','XE','Y','YB','ZN','ZR']

def in_table(word):
	result = False
	for element in elements:
		if element == word:
			return True
		else:
			if len(word) > len(element) and word[:len(element)] == element:
				result = result or in_table(word[len(element):])

	return result

def main():
	word = input()
	if in_table(word):
		print('YES')
	else:
		print('NO')

if __name__ == '__main__':
	main()