

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
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.io.*;

public class Main {
    static long rev_num = 0;
    static long base_pos = 1;
    static long MOD = 1000000007;

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

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

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    static class Reader {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null)
                return;
            din.close();
        }
    }

    static boolean checkPrime(long n) {
        BigInteger b = new BigInteger(String.valueOf(n));
        return b.isProbablePrime(1);
    }

    static long nextPrime(long n) {
        BigInteger b = new BigInteger(String.valueOf(n));
        return Long.parseLong(b.nextProbablePrime().toString());
    }

    public boolean StringisPalindrome(String text) {
        StringBuffer stringBuffer = new StringBuffer(text);
        return stringBuffer.reverse().toString().equals(text);
    }

    public boolean NumberisPalindrome(long n) {
        String text = n + "";
        StringBuffer stringBuffer = new StringBuffer(text);
        return stringBuffer.reverse().toString().equals(text);
    }

    static long gcd(long a, long b) {
        // Everything divides 0
        if (a == 0)
            return b;
        if (b == 0)
            return a;

        // base case
        if (a == b)
            return a;

        // a is greater
        if (a > b)
            return gcd(a - b, b);
        return gcd(a, b - a);
    }

    static long reversDigits(long num) {
        if (num > 0) {
            reversDigits(num / 10);
            rev_num += (num % 10) * base_pos;
            base_pos *= 10;
        }
        return rev_num;
    }

    static long power(long x, long y) {
        // Initialize result
        long res = 1;

        while (y > 0) {
            // If y is odd,
            // multiply
            // x with result
            if ((y & 1) == 1)
                res = (res * x) % MOD;

            // n must be even now
            y = y >> 1; // y = y/2
            x = (x * x) % MOD; // Change x to x^2
        }
        return res % MOD;
    }

    static long power(long x, long y, long p) {

        // Initialize result
        long res = 1;

        // Update x if it is more
        // than or equal to p
        x = x % p;

        while (y > 0) {

            // If y is odd, multiply x with result
            if (y % 2 != 0)
                res = (res * x) % p;

            // y must be even now
            y = y >> 1; // y = y/2
            x = (x * x) % p;
        }
        return res;
    }

    static long power3(long A, long B, long C, long M) {
        long res, ans;

        // Calculate B ^ C (mod M - 1)
        res = power(B, C, M - 1);

        // Calculate A ^ res ( mod M )
        ans = power(A, res, M);

        return ans;
    }
    // ---------------------------------------------

    // program for finding
    // no. of divisors
    static int NumberofDivisors(int n) {
        // sieve method for prime calculation
        boolean hash[] = new boolean[n + 1];
        Arrays.fill(hash, true);
        for (int p = 2; p * p < n; p++)
            if (hash[p] == true)
                for (int i = p * 2; i < n; i += p)
                    hash[i] = false;

        // Traversing through
        // all prime numbers
        int total = 1;
        for (int p = 2; p <= n; p++) {
            if (hash[p]) {

                // calculate number of divisor
                // with formula total div =
                // (p1+1) * (p2+1) *.....* (pn+1)
                // where n = (a1^p1)*(a2^p2)....
                // *(an^pn) ai being prime divisor
                // for n and pi are their respective
                // power in factorization
                int count = 0;
                if (n % p == 0) {
                    while (n % p == 0) {
                        n = n / p;
                        count++;
                    }
                    total = total * (count + 1);
                }
            }
        }
        return total;
    }

    public static void main(String args[]) throws IOException {
        FastReader in = new FastReader();
        Reader sc = new Reader();
        try {
            String s=in.next();
            int l=s.length();
            int c1=0,c2=0;
            String ans="YES";
            if(l>2)
            {
                c1=s.charAt(0)-65;
                c2=s.charAt(1)-65;
                for (int i=2;i<l ;i++ )
                {
                    int c=s.charAt(i);
                    if((c-65)!=(c1+c2)%26)
                    {
                        // System.out.println(c1);
                        // System.out.println(c2);
                        // System.out.println(c);
                        ans="NO";
                        break;
                    }
                    c1=c2;
                    c2=c-65;
                }
            }
            System.out.println(ans);
            // long t = in.nextLong();
            // // long t=in.nextLong();
            // // String st = sc.readLine();
            // // int l=st.length();
            // // HashSet<String> h=new HashSet<String>();
            // // StringBuilder a=new StringBuilder();
            // // System.out.println();

            // while (t > 0) {
            //     t--;
            //     // solve();
            //     System.out.println();
            // }

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    // private static void solve() {

    // }
}