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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
char buf[1 << 21], *p1 = buf, *p2 = buf;
template <class T>
void read(T &x) {
  x = 0;
  int c = getchar();
  int flag = 0;
  while (c < '0' || c > '9') flag |= (c == '-'), c = getchar();
  while (c >= '0' && c <= '9')
    x = (x << 3) + (x << 1) + (c ^ 48), c = getchar();
  if (flag) x = -x;
}
template <class T>
T _max(T a, T b) {
  return b < a ? a : b;
}
template <class T>
T _min(T a, T b) {
  return a < b ? a : b;
}
template <class T>
bool checkmax(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
template <class T>
bool checkmin(T &a, T b) {
  return b < a ? a = b, 1 : 0;
}
string A[] = {"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", "Hf", "Ta", "W",  "Re", "Os", "Ir", "Pt", "Au", "Hg", "Tl",
              "Pb", "Bi", "Po", "At", "Rn", "Fr", "Ra", "Rf", "Db", "Sg", "Bh",
              "Hs", "Mt", "Ds", "Rg", "Cn", "Nh", "Fl", "Mc", "Lv", "Ts", "Og",
              "La", "Ce", "Pr", "Nd", "Pm", "Sm", "Eu", "Gd", "Tb", "Dy", "Ho",
              "Er", "Tm", "Yb", "Lu", "Ac", "Th", "Pa", "U",  "Np", "Pu", "Am",
              "Cm", "Bk", "Cf", "Es", "Fm", "Md", "No", "Lr"};
set<string> S;
string t;
int f[15];
void init() {
  cin >> t;
  for (int i = 0; i < 118; ++i) {
    for (int j = 0; j < (int)A[i].size(); ++j) {
      if (A[i][j] >= 'a' && A[i][j] <= 'z') A[i][j] += 'A' - 'a';
    }
    S.insert(A[i]);
  }
}
void solve() {
  int n = (int)t.size();
  for (int i = 0; i < n; ++i) {
    if (S.count(t.substr(0, i + 1))) f[i] = 1;
    for (int j = 0; j < i; ++j) {
      if (f[j] && S.count(t.substr(j + 1, i - j))) f[i] = 1;
    }
  }
  if (f[n - 1])
    printf("YES\n");
  else
    printf("NO\n");
}
int main() {
  init();
  solve();
  return 0;
}