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.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

public class third {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        String word = br.readLine();
        bw.write(solve(word) ? "YES\n" : "NO\n");
        bw.flush();
    }

    public static boolean solve(String a) {
        if (a.length() <= 2) {
            return true;
        }
        int last = a.charAt(0) - 'A';
        int cur = a.charAt(1) - 'A';
        for (int i = 2; i < a.length(); i++) {
            if ((last + cur) % 26 == a.charAt(i) - 'A') {
                last = cur;
                cur = a.charAt(i) - 'A';
            } else {
                return false;
            }
        }
        return true;
    }
}