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.*;
import java.util.*;

public class Codeforces
{
    public static void main(String args[])throws Exception
    {
        BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb=new StringBuilder();
        char s[]=bu.readLine().toCharArray();
        int i,n=s.length;
        if(n<3) {System.out.println("YES"); return;}
        int a=s[0]-'A',b=s[1]-'A',c;
        boolean pos=true;
        for(i=2;i<s.length;i++)
        {
            c=s[i]-'A';
            int x=(a+b)%26;
            if(c!=x) {pos=false; break;}
            a=b;
            b=c;
        }
        if(pos) sb.append("YES");
        else sb.append("NO");
        System.out.println(sb);
    }
}