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.util.*;
import java.io.*;
public class Main  {
    public static void main(String args[]) {
      FastScanner fs=new FastScanner();    
      PrintWriter out=new PrintWriter(System.out);
      
      String str=fs.next();
      
      if(str.length()==1 || str.length()==2)
      out.println("YES");
      else
      {
          int i;
          for(i=2;i<str.length();i++)
          {
              int curr=str.charAt(i)-'A';
              int p1=str.charAt(i-1)-'A';
              int p2=str.charAt(i-2)-'A';
              int sum=p1+p2;
              if(sum>25)
              sum-=26;
              if(sum!=curr)
              break;
          }
          if(i==str.length())
          out.println("YES");
          else
          out.println("NO");
      }
      
        
        out.flush();
        out.close();
    }
	static void sort(int a[]){
	    ArrayList<Integer> al=new ArrayList<>();
	    for(int x:a)al.add(x);
	    Collections.sort(al);
	    for(int i=0;i<a.length;i++) a[i]=al.get(i);
	}
}
        class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		
		String next() {
			while (!st.hasMoreTokens())
				try {
				st=new StringTokenizer(br.readLine());
				}
				catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		String nextLine() {
		    String str="";
		    try {
		        str=br.readLine();
		    }
		    catch (IOException e) {
		        e.printStackTrace(); 
		    }
		    return str;
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
	}