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

public class FIB {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if (s.length() <= 2)
            System.out.println("YES");
        else {
            int[] arr = new int[s.length()];
            for (int i = 0; i < s.length(); i++) {
                arr[i] = s.charAt(i) - 65 +1;
          //      System.out.print(arr[i] + " ");
            }
            int x = arr[0];
            int y = arr[1];
            int sum=0;
            boolean check = true;
            for (int i = 2; i < s.length(); i++) {
                  sum=x+y;
                if(sum>26)
                     sum-=26;
                if (sum - 1 != arr[i]) {
                    check = false;
                    break;
                }
                x=y;
                y=sum-1;
            }
            System.out.println(check ? "YES" : "NO");
        }
    }
}