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:
//package solutions;
 
import java.util.Scanner;


import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner fs=new Scanner(System.in);
        String text = fs.next();
        char[] line = new char[text.length()];

        // Copy character by character into array
        for (int i = 0; i < text.length(); i++) {
            line[i] = text.charAt(i);
        }
//		long res=0;
//		for (char c:line) {
//			res*=26;
//			res+=(c-'A');
//			System.out.println(c-'A');
//		}
//		System.out.println(res);
        if (line.length<2) {
            System.out.println("YES");
            return;
        }
        int sum=line[0]+line[1]-'A'-'A';
        for (int i=2; i<line.length; i++) {
            sum%=26;
            int next=line[i]-'A';
            if (sum!=next) {
                System.out.println("NO");
                return;
            }
            sum=line[i-1]+line[i]-'A'-'A';
        }
        System.out.println("YES");
    }


}