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.*;
import java.io.*;
public class C_Fibonacci_Words {
    public static void main(String args[]) {
        FastReader input = new FastReader();
        String s = input.getString();
        if(s.length() == 1 || s.length() == 2) {
            System.out.println("YES");
            return;
        }
        int c1 = s.charAt(0) - 65;
        int c2 = s.charAt(1) - 65;
        boolean flag = true;
        for(int i = 2; i < s.length(); i++) {
            int temp = c1 + c2;
            if((temp%26) != (s.charAt(i)-65)) {
                flag = false;
            }
            c1 = c2;
            c2 = temp;
        }
        if(flag) System.out.println("YES");
        else System.out.println("NO");
    }
}

class FastReader {
    BufferedReader br;
    StringTokenizer st;

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

    public String next() {
        while(st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            }catch(Exception e) {
                System.out.println(e);
            }
        }
        return st.nextToken();
    }

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

    public String getString() {
        return next();
    }
}