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

public class Main
{
    public static void main(String[] args) throws IOException {
        OutputStream outputStream = System.out;
        FastReader in = new FastReader();
        PrintWriter out = new PrintWriter(outputStream);
        PROBLEM solver = new PROBLEM();
        int t=1;
        //t = in.nextInt();
        for(int i=0;i<t;i++){
            solver.solve(in, out);
        }
        out.close();
    }
    static class PROBLEM
    {
        public void solve(FastReader in,PrintWriter out)
        {

            char[] s = in.nextLine().toCharArray();


            int flag = 1;
            for (int i = 2; i < s.length; i++) {

                int a = s[i-2] - 65;
                int b = s[i-1] - 65;
                int c = s[i] - 65;
                if(c != (a+b)%26){
                    out.println("NO");
                    flag = 0;
                    break;
                }
            }

            if(flag == 1) out.println("YES");
        }
    }



    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        char nextChar() {
            return next().charAt(0);
        }

        boolean nextBoolean() {
            return !(nextInt() == 0);
        }
        // boolean nextBoolean(){return Boolean.parseBoolean(next());}

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }

    private static int[] mergeSort(int[] array){

        if(array.length <= 1){
            return array;
        }

        int midpoint = array.length / 2;

        int[] left = new int[midpoint];
        int[] right;

        if(array.length % 2 == 0){
            right = new int[midpoint];
        }else{
            right = new int[midpoint + 1];
        }

        for (int i = 0; i < left.length; i++) {
            left[i] = array[i];
        }

        for (int i = 0; i < right.length; i++) {
            right[i] = array[i + midpoint];
        }

        int[] result = new int[array.length];

        left = mergeSort(left);
        right = mergeSort(right);

        result = merge(left, right);

        return result;
    }

    private static int[] merge(int[] left, int[] right){

        int[] result = new int[left.length + right.length];
        int leftPointer = 0, rightPointer = 0, resultPointer = 0;

        while(leftPointer < left.length || rightPointer < right.length){

            if(leftPointer < left.length && rightPointer < right.length){

                if(left[leftPointer] < right[rightPointer]){
                    result[resultPointer++] = left[leftPointer++];
                }else{
                    result[resultPointer++] = right[rightPointer++];
                }
            }else if(leftPointer < left.length){
                result[resultPointer++] = left[leftPointer++];
            }else{
                result[resultPointer++] = right[rightPointer++];
            }
        }
        return result;
    }
}