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.util.ArrayList;
import java.util.Scanner;
import java.io.IOException;

public class A {
    public static int g(String s, int p) {
        return s.charAt(p) - 'A';
    }

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        if (s.length() <= 2) {
            System.out.println("YES");
            return;
        }
        int o = g(s, 0), t = g(s, 1);
        boolean can = true;
        for (int i = 2; i < s.length() && can; i++) {
            int c = g(s,i);
            int sum = o + t;
            sum %= 26;
            if(sum != c){
                can = false;
                continue;
            }
            o = t;
            t = sum;
        }
        System.out.println(can ? "YES" : "NO");
    }
}