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 JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub

		  InputStreamReader r=new InputStreamReader(System.in);    
	              BufferedReader br=new BufferedReader(r);    
			  String str=br.readLine();
			  
			  if(str.length()<=2)
			  {
                 	System.out.println("YES");	  
			  }else {
				  
				  int i=(str.charAt(0)-'A'+1);
				  int j=(str.charAt(1)-'A'+1);
				   boolean flag=true;
				  for(int k=2;k<str.length();k++)
				  {
					  
					  int ch=str.charAt(k)-'A'+1;
					  
					  ch=ch%26;
					  
					  
					  if((ch+1)%26==(i+j)%26)
					  {
						  i=j%26;
						  j=ch%26;
						  
					  }else {
						  
						 flag=false;
						 break;
					  }
					  
					  
				  }
				  
				  if(flag)
				  {
					  System.out.println("YES");
				  }else {
					  System.out.println("NO");
				  }
				  
			  }
			  
			  
	
			  
	}
	
	
	}