

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.*;
import java.util.*;

public class CodeForces {
	
	static int mod = 1000000007;
	static boolean flag = false;
	static int d = 100001;

	public static void main(String[] args) throws FileNotFoundException {
		FastScanner sc = new FastScanner();
		StringBuilder sb = new StringBuilder();
		int t = 1;//sc.nextInt();
		while (t-- > 0) {
			solve(sc,sb);
		}
		System.out.print(sb);
	}

	private static void solve(FastScanner sc, StringBuilder sb) {
		
		String str=sc.nextLine();
		
		if(str.length()<=2) {
			sb.append("YES\n");return;
		}
		
		int a=str.charAt(0)-'A';
		int b=str.charAt(1)-'A';
	
		for(int i=2;i<str.length();i++) {
			int ch=str.charAt(i)-'A';
			int sum=(a+b)%26;
			if(ch!=sum) {
				sb.append("NO\n");return;
			}
			a=b;
			b=ch;
			
		}
		sb.append("YES\n");
	}

	public static void debug(boolean flag, String str) {
		if (flag) {
			System.out.println(str);
		}
	}
}

class Pair implements Comparable<Pair> {
	int first, second;

	Pair(int f, int s) {
		first = f;
		second = s;
	}

	@Override
	public int compareTo(Pair o) {
		if (first == o.first) {
			return second - o.second;
		}
		return first - o.first;
	}

}

class FastScanner {
	BufferedReader br;
	StringTokenizer st;

	public FastScanner() throws FileNotFoundException {
		try {
			File file = new File("src\\input.txt");
			br = new BufferedReader(new FileReader(file));
		} catch (Exception e) {
			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());
	}

	int[] nextInts(int N) {
		int[] res = new int[N];
		for (int i = 0; i < N; i++) {
			res[i] = (int) nextLong();
		}
		return res;
	}

	long[] nextLongs(int N) {
		long[] res = new long[N];
		for (int i = 0; i < N; i++) {
			res[i] = nextLong();
		}
		return res;
	}

	public double[] nextDoubles(int N) {
		double[] res = new double[N];
		for (int i = 0; i < N; i++) {
			res[i] = nextDouble();
		}
		return res;
	}

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