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[233];
void pretype() {
  s[1] = "H";
  s[2] = "HE";
  s[3] = "LI";
  s[4] = "BE";
  s[5] = "B";
  s[6] = "C";
  s[7] = "N";
  s[8] = "O";
  s[9] = "F";
  s[10] = "NE";
  s[11] = "NA";
  s[12] = "MG";
  s[13] = "AL";
  s[14] = "SI";
  s[15] = "P";
  s[16] = "S";
  s[17] = "CL";
  s[18] = "AR";
  s[19] = "K";
  s[20] = "CA";
  s[21] = "SC";
  s[22] = "TI";
  s[23] = "V";
  s[24] = "CR";
  s[25] = "MN";
  s[26] = "FE";
  s[27] = "CO";
  s[28] = "NI";
  s[29] = "CU";
  s[30] = "ZN";
  s[31] = "GA";
  s[32] = "GE";
  s[33] = "AS";
  s[34] = "SE";
  s[35] = "BR";
  s[36] = "KR";
  s[37] = "RB";
  s[38] = "SR";
  s[39] = "Y";
  s[40] = "ZR";
  s[41] = "NB";
  s[42] = "MO";
  s[43] = "TC";
  s[44] = "RU";
  s[45] = "RH";
  s[46] = "PD";
  s[47] = "AG";
  s[48] = "CD";
  s[49] = "IN";
  s[50] = "SN";
  s[51] = "SB";
  s[52] = "TE";
  s[53] = "I";
  s[54] = "XE";
  s[55] = "CS";
  s[56] = "BA";
  s[57] = "LA";
  s[58] = "CE";
  s[59] = "PR";
  s[60] = "ND";
  s[61] = "PM";
  s[62] = "SM";
  s[63] = "EU";
  s[64] = "GD";
  s[65] = "TB";
  s[66] = "DY";
  s[67] = "HO";
  s[68] = "ER";
  s[69] = "TM";
  s[70] = "YB";
  s[71] = "LU";
  s[72] = "HF";
  s[73] = "TA";
  s[74] = "W";
  s[75] = "RE";
  s[76] = "OS";
  s[77] = "IR";
  s[78] = "PT";
  s[79] = "AU";
  s[80] = "HG";
  s[81] = "TL";
  s[82] = "PB";
  s[83] = "BI";
  s[84] = "PO";
  s[85] = "AT";
  s[86] = "RN";
  s[87] = "FR";
  s[88] = "RA";
  s[89] = "AC";
  s[90] = "TH";
  s[91] = "PA";
  s[92] = "U";
  s[93] = "NP";
  s[94] = "PU";
  s[95] = "AM";
  s[96] = "CM";
  s[97] = "BK";
  s[98] = "CF";
  s[99] = "ES";
  s[100] = "FM";
  s[101] = "MD";
  s[102] = "NO";
  s[103] = "LR";
  s[104] = "RF";
  s[105] = "DB";
  s[106] = "SG";
  s[107] = "BH";
  s[108] = "HS";
  s[109] = "MT";
  s[110] = "DS";
  s[111] = "RG";
  s[112] = "CN";
  s[113] = "NH";
  s[114] = "FL";
  s[115] = "MC";
  s[116] = "LV";
  s[117] = "TS";
  s[118] = "OG";
}
map<string, int> mp;
string t;
bool check(int l, int r) {
  if (l > r) return true;
  string s1 = "", s2 = "";
  s1 += t[l], s2 += t[l];
  bool res = 0;
  if (mp[s1]) res |= check(l + 1, r);
  if (l < r) {
    s2 += t[l + 1];
    if (mp[s2]) res |= check(l + 2, r);
  }
  return res;
}
int main() {
  pretype();
  cin >> t;
  for (int i = 1; i <= 118; i++) mp[s[i]] = 1;
  printf("%s\n", check(0, t.size() - 1) ? "YES" : "NO");
}