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;
struct pair_hash {
  template <class T1, class T2>
  std::size_t operator()(const std::pair<T1, T2>& pair) const {
    return std::hash<T1>()(pair.first) ^ std::hash<T2>()(pair.second);
  }
};
const long double EPS = 1e-7;
const long long MOD = 1000000007;
const long long INF = 1e18;
const long double pi = 2 * acos(0.0);
long long n, m, k, p, q, t, sum = 0, cnt = 0;
long long mx = -INF;
long long mn = INF;
bool flag = 0;
vector<long long> v;
string s = "", s1, s2;
void bad_solve() {}
vector<char> vec;
vector<string> v2;
bool can[1000];
void solve() {
  vec.push_back('H');
  vec.push_back('B');
  vec.push_back('C');
  vec.push_back('N');
  vec.push_back('O');
  vec.push_back('F');
  vec.push_back('P');
  vec.push_back('S');
  vec.push_back('K');
  vec.push_back('V');
  vec.push_back('Y');
  vec.push_back('I');
  vec.push_back('W');
  vec.push_back('U');
  v2.push_back("HE");
  v2.push_back("LI");
  v2.push_back("BE");
  v2.push_back("NE");
  v2.push_back("NA");
  v2.push_back("MG");
  v2.push_back("AL");
  v2.push_back("SI");
  v2.push_back("CL");
  v2.push_back("AR");
  v2.push_back("CA");
  v2.push_back("SC");
  v2.push_back("TI");
  v2.push_back("CR");
  v2.push_back("MN");
  v2.push_back("FE");
  v2.push_back("CO");
  v2.push_back("NI");
  v2.push_back("CU");
  v2.push_back("ZN");
  v2.push_back("GA");
  v2.push_back("GE");
  v2.push_back("AS");
  v2.push_back("SE");
  v2.push_back("BR");
  v2.push_back("KR");
  v2.push_back("RB");
  v2.push_back("SR");
  v2.push_back("ZR");
  v2.push_back("NB");
  v2.push_back("MO");
  v2.push_back("TC");
  v2.push_back("RU");
  v2.push_back("RH");
  v2.push_back("PD");
  v2.push_back("AG");
  v2.push_back("CD");
  v2.push_back("IN");
  v2.push_back("SN");
  v2.push_back("SB");
  v2.push_back("TE");
  v2.push_back("XE");
  v2.push_back("CS");
  v2.push_back("BA");
  v2.push_back("LA");
  v2.push_back("HF");
  v2.push_back("TA");
  v2.push_back("RE");
  v2.push_back("OS");
  v2.push_back("IR");
  v2.push_back("PT");
  v2.push_back("AU");
  v2.push_back("HG");
  v2.push_back("TL");
  v2.push_back("PB");
  v2.push_back("BI");
  v2.push_back("PO");
  v2.push_back("AT");
  v2.push_back("RN");
  v2.push_back("FR");
  v2.push_back("RA");
  v2.push_back("AC");
  v2.push_back("RF");
  v2.push_back("DB");
  v2.push_back("SG");
  v2.push_back("BH");
  v2.push_back("HS");
  v2.push_back("MT");
  v2.push_back("DS");
  v2.push_back("RG");
  v2.push_back("CN");
  v2.push_back("NH");
  v2.push_back("FL");
  v2.push_back("MC");
  v2.push_back("LV");
  v2.push_back("TS");
  v2.push_back("OG");
  v2.push_back("CE");
  v2.push_back("PR");
  v2.push_back("ND");
  v2.push_back("PM");
  v2.push_back("SM");
  v2.push_back("EU");
  v2.push_back("GD");
  v2.push_back("TB");
  v2.push_back("DY");
  v2.push_back("HO");
  v2.push_back("ER");
  v2.push_back("TM");
  v2.push_back("YB");
  v2.push_back("LU");
  v2.push_back("TH");
  v2.push_back("PA");
  v2.push_back("NP");
  v2.push_back("PU");
  v2.push_back("AM");
  v2.push_back("CM");
  v2.push_back("BK");
  v2.push_back("CF");
  v2.push_back("ES");
  v2.push_back("FM");
  v2.push_back("MD");
  v2.push_back("NO");
  v2.push_back("LR");
  string line;
  cin >> line;
  can[0] = true;
  for (int i = 1; i <= line.size(); i++) {
    if (i > 1) {
      for (int j = 0; j < v2.size(); j++) {
        if (can[i - 2] && line[i - 2] == v2[j][0] && line[i - 1] == v2[j][1])
          can[i] = true;
      }
    }
    if (i == 6) {
      cout << "";
    }
    for (int j = 0; j < vec.size(); j++) {
      if (can[i - 1] && line[i - 1] == vec[j]) can[i] = true;
    }
  }
  if (can[line.size()]) {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
int main() {
  cout.precision(20);
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}