

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.StringTokenizer;
    import java.util.*;
    import java.math.*;
    import java.lang.Integer;
     
    public class Solution {
    	
    	
    	public static boolean test(String s) {
    		
    		boolean res=false;
    		
    		if (s.length()<=2){
    			res=check(s);
    		}
    		
    		
    		if (s.length()>1&&check(s.substring(0,1))){

    			res=res||test(s.substring(1,s.length()));
    		}
    		
    		if (res) {return res;}
    		
    		
    		if (s.length()>2&&check(s.substring(0,2))){

    			res=res||test(s.substring(2,s.length()));
    			
    		}
    		
    		return res;
    	}
    	
    	public static boolean check(String s) {
    		
    		boolean res=false;
    		
    		String[] checklist={"H", "HE", "LI", "BE", "B", "C", "N", "O", "F", "NE", "NA","MG",
    				"AL", "SI", "P", "S", "CL", "AR", "K", "CA", "SC", "TI", "V", "CR", 
    				"MN", "FE", "CO", "NI", "CU", "ZN", "GA", "GE", "AS", "SE", "BR", 
    				"KR", "RB", "SR", "Y", "ZR", "NB", "MO", "TC", "RU", "RH", "PD", 
    				"AG", "CD", "IN", "SN", "SB", "TE", "I", "XE", "CS", "BA", "LA", 
    				"CE", "PR", "ND", "PM", "SM", "EU", "GD", "TB", "DY", "HO", "ER", 
    				"TM", "YB", "LU", "HF", "TA", "W", "RE", "OS", "IR", "PT", "AU", 
    				"HG", "TL", "PB", "BI", "PO", "AT", "RN", "FR", "RA", "AC", "TH", 
    				"PA", "U", "NP", "PU", "AM", "CM", "BK", "CF", "ES", "FM", "MD", 
    				"NO", "LR", "RF", "DB", "SG", "BH", "HS", "MT", "DS", "RG", "CN",
    				"NH", "FL", "MC", "LV", "TS", "OG"};
    		
    		for (int i = 0; i < checklist.length; i++) {
    			if (s.equals(checklist[i])){
    				res = true;
    				break;
    			}
    		}
    		
    		return res;
    	}
    	
    	public static void main(String[] args) throws Exception {
    		FastScanner cin = new FastScanner(System.in);
    		String str = cin.nextLine();
    		
    		boolean res= test(str);
    		
    		if (res){
    			System.out.println("YES");
    		} else{
    			System.out.println("NO");
    		}
    		
    		
    	}
     
    	static class FastScanner {
    		private BufferedReader reader = null;
    		private StringTokenizer tokenizer = null;
     
    		public FastScanner(InputStream in) {
    			reader = new BufferedReader(new InputStreamReader(in));
    			tokenizer = null;
    		}
     
    		public String next() {
    			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
    				try {
    					tokenizer = new StringTokenizer(reader.readLine());
    				} catch (IOException e) {
    					throw new RuntimeException(e);
    				}
    			}
    			return tokenizer.nextToken();
    		}
     
    		public String nextLine() {
    			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
    				try {
    					return reader.readLine();
    				} catch (IOException e) {
    					throw new RuntimeException(e);
    				}
    			}
     
    			return tokenizer.nextToken("\n");
    		}
     
    		public long nextLong() {
    			return Long.parseLong(next());
    		}
     
    		public int nextInt() {
    			return Integer.parseInt(next());
    		}
     
    	}
    }