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

public class Elementary {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        HashSet<String> table = new HashSet<>();

        String[] arr = {"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", "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hg", "Tl", "Pb",
                "Bi", "Po", "At", "Rn", "Fr", "Ra", "Ac", "Rf", "Db", "Sg", "Bh", "Hs", "Mt", "Ce", "Pr", "Nd", "Pm",
                "Sm", "Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb", "Lu", "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 (String value : arr) table.add(value.toUpperCase());

        String str = in.nextLine();
        int[] found = new int[str.length()];

        boolean haha = true;

        if (str.length() == 1) {
            System.out.println(table.contains(str) ? "YES" : "NO");
        } else {

            for (int i = 0; i < str.length(); i++) {
                if (table.contains(str.charAt(i) + ""))
                    found[i] = 1;
                if (i + 1 < str.length() && table.contains(str.charAt(i) + "" + str.charAt(i + 1)))
                    found[i] = found[i + 1] = 1;
            }
            
            for (int value : found)
                if (value == 0) {
                    haha = false;
                    break;
                }

            System.out.println(haha ? "YES" : "NO");
        }
    }
}