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