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