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