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.*;
public class prog1
{
    public static void main(String[] args)throws IOException
    {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String s=br.readLine();
        int l=s.length();
        int[] num=new int[l];
        int i;
        for( i=0;i<l;i++)
        {
            num[i]=s.charAt(i)-64;
        }
        int a=num[0];;
        int b=0;
        int sum=0;
        int fl=1;
        for(i=1;i<l-1;i++)
        {
            b=num[i];
            sum=a+b;
            a=num[i];
            if(sum>26)
            {
                sum=sum-26;
            }
            if(sum-1!=(num[i+1]))
            {
                fl=0;
                break;
            }
        }
        if(fl==1)
        {
            System.out.println("YES");
        }
        else
        {
            System.out.println("NO");
        }
    }
}