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.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class C {

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			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;
		}
	}

	public static void main(String[] args) {
		FastScanner f = new FastScanner();
		char c[] = f.next().toCharArray();
		int ascii[] = new int[c.length];
		for (int i = 0; i < ascii.length; i++) {
			ascii[i] = ((int) c[i] - 65) % 26;
		}
		boolean ans = true;
		if (c.length == 1 || c.length == 2) {
			System.out.println("YES");
		} else {
			for (int i = 2; i < ascii.length; i++) {
				if (ascii[i] != (ascii[i - 1] + ascii[i - 2]) % 26) {
					ans = false;
					break;
				}
			}
			if (ans == true)
				System.out.println("YES");
			else
				System.out.println("NO");
		}
//		
//		for(int i=0;i<ascii.length;i++) {
//			System.out.print(ascii[i]+" ");
//		}
	}

}