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.InputStreamReader;

public class C {
    public static void main(String[] args) throws Exception {
        BufferedReader buffer = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int t = 1;
        while (t-- > 0) {
            String s = buffer.readLine();
            if (s.length() <= 2)
                System.out.println("YES");
            else {
                boolean check = true;
                for (int i = 2; i < s.length(); i++) {
                    int c = s.charAt(i) - 'A', b = s.charAt(i-1) -'A', a = s.charAt(i-2) - 'A';
                    if (c != (a+b)%26)
                    {
                        check = false;
                        break;
                    }
                }
                if (check)
                    System.out.println("YES");
                else
                    System.out.println("NO");
            }
        }
        System.out.println(sb);
    }
}