

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
//2021 A q1

import java.util.*;
import java.io.*;

public class Solution {
    public static void main(String args[]) {
        Scanner input = new Scanner(System.in);
        int caseNum =1;
        for (int ks = 1; ks <= caseNum; ks++) {
            System.out.println(new Solution().solve(input));
        }
    }
    
    public String solve(Scanner scanner) {
        
        String rrr = scanner.nextLine();
        int[] cur = new int[rrr.length()];
        for(int i = 0;i<rrr.length();i++){
            cur[i] = (rrr.charAt(i)-'A')+1;
        }

        String s = "YES";
        for(int i = 2;i<cur.length;i++){
            if((cur[i-2]+cur[i-1]-1)%26!=cur[i]){
                s = "NO";
                break;
            }
        }
        

        return s;


    }

    public static int sol(Integer[][][][] dp, String a, String b, int l1, int r1, int l2, int r2){

        if(r1<0||r2<0||l1==a.length()||l2==b.length()){
            return Integer.MAX_VALUE;
        }

        if(dp[l1][r1][l2][r2]!=null){
            return dp[l1][r1][l2][r2];
        }
        if(l1>r1){
            dp[l1][r1][l2][r2] = r2-l2+1;
            return r2-l2+1;
        }
        if(l2>r2){
            dp[l1][r1][l2][r2] = r1-l1+1;
            return r1-l1+1;
        }
        if(a.substring(l1,r1).equals(b.substring(l2,r2))){
            dp[l1][r1][l2][r2] = 0;
            return 0;
        }
        
        int ans = Integer.MAX_VALUE;
        if(r1-l1>=r2-l2){
            ans = Math.min(ans,1+Math.min(sol(dp,a,b,l1+1,r1,l2,r2),sol(dp,a,b,l1,r1-1,l2,r2)));
        }
        if(r2-l2>=r1-l1){
            ans = Math.min(ans,1+Math.min(sol(dp,a,b,l1,r1,l2+1,r2),sol(dp,a,b,l1,r1,l2,r2-1)));
        }
        dp[l1][r1][l2][r2] = ans;
        return ans;

    }

    /*
        - The following are helping method so pls do not do anything to them.
    
    */

    public static int[][] to2d(Scanner scanner, int m, int n){
        int[][] ans = new int[m][n];
        for(int i = 0;i<m;i++){
            String[] r = scanner.nextLine().split("[ ]");
            for(int j = 0;j<n;j++){
                ans[i][j] = stoi(r[j]);
            }
        }
        return ans;
    }

    public static int[] toArray(Scanner scanner, int m){
        int[] ans = new int[m];
        String[] r = scanner.nextLine().split("[ ]");
        for(int i = 0;i<m;i++){
            ans[i] = stoi(r[i]);
        }
        
        return ans;
    }

    public static void printArr(int[] a){
        for(int i = 0;i<a.length;i++){
            System.out.print(a[i]);
            if(i!=a.length-1){
                System.out.print(" ");
            }
        }
    }

    public static void print2d(int[][] a){
        for(int j=0;j<a.length;j++){
            for(int i = 0;i<a[j].length;i++){
                System.out.print(a[j][i]);
                if(i!=a[j].length-1){
                    System.out.print(" ");
                }
            }
            System.out.println(" ");
        }
    }

    public static int stoi(String s){
        return Integer.parseInt(s);
    }
}
