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 Main {
    public static int findIndex(char letter, char[] alphabet) {
        int index = 0;
        for (int i = 0; i < alphabet.length; i++) {
            if (letter == alphabet[i]) {
                index = i;
                break;
            }
        }
        return index;
    }

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char[] alphabet = "abcdefghijklmnopqrstuvwxyz".toUpperCase().toCharArray();

        String word = br.readLine();
        if (word.length() < 3) {
            System.out.println("YES");
        } else {
            int f0 = findIndex(word.charAt(0), alphabet);
            int f1 = findIndex(word.charAt(1), alphabet);
            // System.out.println(f0);
            // System.out.println(f1);

            for (int i = 2; i < word.length(); i++) {
                int f2 = findIndex(word.charAt(i), alphabet);
                // System.out.println(f2);
                int actualResult = (f0 + f1) % 26;
                // System.out.println(actualResult);
                if (actualResult != f2) {
                    System.out.println("NO");
                    return;
                }
                f0 = f1;
                f1 = f2;
            }
            System.out.println("YES");

        }
    }
}