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;
template <class T>
void splitstr(const string &s, vector<T> &out) {
  istringstream in(s);
  out.clear();
  copy(istream_iterator<T>(in), istream_iterator<T>(), back_inserter(out));
}
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
static void redirect(int argc, const char **argv) {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  if (argc > 1) {
    static filebuf f;
    f.open(argv[1], ios::in);
    cin.rdbuf(&f);
    if (!cin) {
      cerr << "Failed to open '" << argv[1] << "'" << endl;
      exit(1);
    }
  }
  if (argc > 2) {
    static filebuf f;
    f.open(argv[2], ios::out | ios::trunc);
    cout.rdbuf(&f);
    if (!cout) {
      cerr << "Failed to open '" << argv[2] << "'" << endl;
    }
  }
  cin.exceptions(ios::failbit);
}
static set<string> elems{
    "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",
};
int main(int argc, const char **argv) {
  redirect(argc, argv);
  string s;
  cin >> s;
  for (char &c : s) c = tolower(c);
  int L = ((long long)(s).size());
  vector<bool> dp(L + 1);
  dp[0] = true;
  for (int i = 1; i <= L; i++) {
    for (int j = 1; j <= min(i, 2); j++)
      if (dp[i - j] && elems.count(s.substr(i - j, j))) dp[i] = true;
  }
  cout << (dp[L] ? "YES\n" : "NO\n");
  return 0;
}