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.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class ProbC
{

    public static void main(String[] args) throws Exception
    {
        BufferedReader s = new BufferedReader(new InputStreamReader(System.in));

        String input = s.readLine();
        if (compute(input))
            System.out.println("YES");
        else
            System.out.println("NO");
    }

    public static boolean compute(String in)
    {
        char[] chars = in.toCharArray();

        if (chars.length <= 2)
        {
            return true;
        }

        int[] nums = new int[chars.length];
        for (int i = 0; i < chars.length; i++)
        {
            int pos = chars[i] - 'A';
            nums[i] = pos;
        }
//        System.out.println(Arrays.toString(nums));
        boolean res = true;
        for (int i = 2; i < chars.length; i++)
        {
            res = res && nums[i] == (nums[i - 1] + nums[i - 2]) % 26;
        }
        return res;
    }
}