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;
vector<long long> tim;
vector<pair<long long, long long>> bases;
vector<char> lt;
vector<string> pr;
bool can[1000];
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  ;
  lt.push_back('H');
  lt.push_back('B');
  lt.push_back('C');
  lt.push_back('N');
  lt.push_back('O');
  lt.push_back('F');
  lt.push_back('P');
  lt.push_back('S');
  lt.push_back('K');
  lt.push_back('V');
  lt.push_back('Y');
  lt.push_back('I');
  lt.push_back('W');
  lt.push_back('U');
  pr.push_back("HE");
  pr.push_back("LI");
  pr.push_back("BE");
  pr.push_back("NE");
  pr.push_back("NA");
  pr.push_back("MG");
  pr.push_back("AL");
  pr.push_back("SI");
  pr.push_back("CL");
  pr.push_back("AR");
  pr.push_back("CA");
  pr.push_back("SC");
  pr.push_back("TI");
  pr.push_back("CR");
  pr.push_back("MN");
  pr.push_back("FE");
  pr.push_back("CO");
  pr.push_back("NI");
  pr.push_back("CU");
  pr.push_back("ZN");
  pr.push_back("GA");
  pr.push_back("GE");
  pr.push_back("AS");
  pr.push_back("SE");
  pr.push_back("BR");
  pr.push_back("KR");
  pr.push_back("RB");
  pr.push_back("SR");
  pr.push_back("ZR");
  pr.push_back("NB");
  pr.push_back("MO");
  pr.push_back("TC");
  pr.push_back("RU");
  pr.push_back("RH");
  pr.push_back("PD");
  pr.push_back("AG");
  pr.push_back("CD");
  pr.push_back("IN");
  pr.push_back("SN");
  pr.push_back("SB");
  pr.push_back("TE");
  pr.push_back("XE");
  pr.push_back("CS");
  pr.push_back("BA");
  pr.push_back("LA");
  pr.push_back("HF");
  pr.push_back("TA");
  pr.push_back("RE");
  pr.push_back("OS");
  pr.push_back("IR");
  pr.push_back("PT");
  pr.push_back("AU");
  pr.push_back("HG");
  pr.push_back("TL");
  pr.push_back("PB");
  pr.push_back("BI");
  pr.push_back("PO");
  pr.push_back("AT");
  pr.push_back("RN");
  pr.push_back("FR");
  pr.push_back("RA");
  pr.push_back("AC");
  pr.push_back("RF");
  pr.push_back("DB");
  pr.push_back("SG");
  pr.push_back("BH");
  pr.push_back("HS");
  pr.push_back("MT");
  pr.push_back("DS");
  pr.push_back("RG");
  pr.push_back("CN");
  pr.push_back("NH");
  pr.push_back("FL");
  pr.push_back("MC");
  pr.push_back("LV");
  pr.push_back("TS");
  pr.push_back("OG");
  pr.push_back("CE");
  pr.push_back("PR");
  pr.push_back("ND");
  pr.push_back("PM");
  pr.push_back("SM");
  pr.push_back("EU");
  pr.push_back("GD");
  pr.push_back("TB");
  pr.push_back("DY");
  pr.push_back("HO");
  pr.push_back("ER");
  pr.push_back("TM");
  pr.push_back("YB");
  pr.push_back("LU");
  pr.push_back("TH");
  pr.push_back("PA");
  pr.push_back("NP");
  pr.push_back("PU");
  pr.push_back("AM");
  pr.push_back("CM");
  pr.push_back("BK");
  pr.push_back("CF");
  pr.push_back("ES");
  pr.push_back("FM");
  pr.push_back("MD");
  pr.push_back("NO");
  pr.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 < pr.size(); j++) {
        if (can[i - 2] && line[i - 2] == pr[j][0] && line[i - 1] == pr[j][1])
          can[i] = true;
      }
    }
    if (i == 6) {
      cout << "";
    }
    for (int j = 0; j < lt.size(); j++) {
      if (can[i - 1] && line[i - 1] == lt[j]) can[i] = true;
    }
  }
  if (can[line.size()]) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}