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:
// Arnab Biswas
// Thank You

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

public class div {
	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;
		}
	}
	public static void main(String[] args) {
		try {
			System.setIn(new FileInputStream("input.txt"));
			System.setOut(new PrintStream(new FileOutputStream("output.txt")));
		} catch (Exception e) {
			System.err.println("Error");
		}

		FastReader fs = new FastReader();
		String s = fs.next();
		s = s.toUpperCase();

		if (s.length() <= 2) {
			System.out.println("YES");
			System.exit(0);
		}
		HashMap<Character, Integer> map = new HashMap<>();
		for (int i = 65; i <= (65 + 25); i++) {
			map.put((char)i, i - 65);
		}
		// System.out.println(map);

		char[] arr = s.toCharArray();

		for (int i = 2; i < arr.length; i++) {
			char a = arr[i - 2];
			char b = arr[i - 1];
			char c = arr[i];
			int A = map.get(a);
			int B = map.get(b);
			int C = map.get(c);
			if (((A + B) % 26) != C) {
				System.out.println("NO");
				System.exit(0);

			}
		}
		System.out.println("YES");
	}
}