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

public class F {

	public String[] elem;
	
	public boolean solve(String s, int ind) {
		if(ind >= s.length()) {
			return true;
		}

		boolean can = false;

		for(int i = 0; i < 128; i++) {
			if(ind + elem[i].length() <= s.length()) {
				boolean tmpcan = true;
				for(int j = 0; j < elem[i].length(); j++) {
					if(s.charAt(ind + j) != elem[i].charAt(j)) {
						tmpcan = false;
					}
				}

				if(tmpcan) {
					if(solve(s, ind + elem[i].length())) {
						can = true;
					}
				}
			}
		}

		return can;
	}


	public void realMain() throws Exception {

		BufferedReader fin = new BufferedReader(new InputStreamReader(System.in), 1000000);

		int i = 0;


		/*while(true) {
String in = fin.readLine();
		String[] ar = in.split("\t");

		String element = ar[0];
		if(ar[0].equals("")) {
			element = ar[1];
		}
		

		System.out.println("elem[" + i + "] = \"" + element.toUpperCase().trim() + "\";");
		i++;
		}*/

		elem = new String[128];

elem[0] = "AC";
elem[1] = "AG";
elem[2] = "AL";
elem[3] = "AM";
elem[4] = "AR";
elem[5] = "AS";
elem[6] = "AT";
elem[7] = "AU";
elem[8] = "B";
elem[9] = "BA";
elem[10] = "BE";
elem[11] = "BH";
elem[12] = "BI";
elem[13] = "BK";
elem[14] = "BR";
elem[15] = "C";
elem[16] = "CA";
elem[17] = "CD";
elem[18] = "CE";
elem[19] = "CF";
elem[20] = "CL";
elem[21] = "CM";
elem[22] = "CO";
elem[23] = "CR";
elem[24] = "CS";
elem[25] = "CU";
elem[26] = "DB";
elem[27] = "DS";
elem[28] = "DY";
elem[29] = "ER";
elem[30] = "ES";
elem[31] = "EU";
elem[32] = "F";
elem[33] = "FE";
elem[34] = "FM";
elem[35] = "FR";
elem[36] = "GA";
elem[37] = "GD";
elem[38] = "GE";
elem[39] = "H";
elem[40] = "HE";
elem[41] = "HF";
elem[42] = "HG";
elem[43] = "HO";
elem[44] = "HS";
elem[45] = "I";
elem[46] = "IN";
elem[47] = "IR";
elem[48] = "K";
elem[49] = "KR";
elem[50] = "LA";
elem[51] = "LI";
elem[52] = "LR";
elem[53] = "LU";
elem[54] = "MD";
elem[55] = "MG";
elem[56] = "MN";
elem[57] = "MO";
elem[58] = "MT";
elem[59] = "N";
elem[60] = "NA";
elem[61] = "NB";
elem[62] = "ND";
elem[63] = "NE";
elem[64] = "NI";
elem[65] = "NO";
elem[66] = "NP";
elem[67] = "O";
elem[68] = "OS";
elem[69] = "P";
elem[70] = "PA";
elem[71] = "PB";
elem[72] = "PD";
elem[73] = "PM";
elem[74] = "PO";
elem[75] = "PR";
elem[76] = "PT";
elem[77] = "PU";
elem[78] = "RA";
elem[79] = "RB";
elem[80] = "RE";
elem[81] = "RF";
elem[82] = "RG";
elem[83] = "RH";
elem[84] = "RN";
elem[85] = "RU";
elem[86] = "S";
elem[87] = "SB";
elem[88] = "SC";
elem[89] = "SE";
elem[90] = "SG";
elem[91] = "SI";
elem[92] = "SM";
elem[93] = "SN";
elem[94] = "SR";
elem[95] = "TA";
elem[96] = "TB";
elem[97] = "TC";
elem[98] = "TE";
elem[99] = "TH";
elem[100] = "TI";
elem[101] = "TL";
elem[102] = "TM";
elem[103] = "U";
elem[104] = "UUB";
elem[105] = "UUH";
elem[106] = "UUO";
elem[107] = "UUP";
elem[108] = "UUQ";
elem[109] = "UUS";
elem[110] = "UUT";
elem[111] = "V";
elem[112] = "W";
elem[113] = "XE";
elem[114] = "Y";
elem[115] = "YB";
elem[116] = "ZN";
elem[117] = "ZR";
elem[118] = "MT";
elem[119] = "DS";
elem[120] = "RG";
elem[121] = "CN";
elem[122] = "NH";
elem[123] = "FL";
elem[124] = "MC";
elem[125] = "LV";
elem[126] = "TS";
elem[127] = "OG";


		String in = fin.readLine();

			
		boolean can = false;

		can = solve(in, 0);

		if(can) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}



	}


	public static void main(String[] args) throws Exception {
		F f = new F();
		f.realMain();
	}
}