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;
template <class C>
void setmin(C &a, C b) {
  if (a > b) a = b;
}
template <class C>
void setmax(C &a, C b) {
  if (a < b) a = b;
}
template <class C>
void printv(vector<C> vec, string end = " ") {
  for (auto const &iter : vec) cout << iter << end;
  if (end != "\n") cout << endl;
}
template <class C>
void printv(set<C> setc, string end = " ") {
  for (auto const &iter : setc) cout << iter << end;
  if (end != "\n") cout << endl;
}
template <class C>
void print(C A[], long long n, string end = " ") {
  for (long long iter = 0; iter < n; ++iter) cout << A[iter] << end;
  if (end != "\n") cout << endl;
}
class Solution {
 public:
  void SolutionFunc() {
    string el[] = {
        "H",  "HE", "LI", "BE", "B",  "C",  "N",  "O",  "F",  "NE", "NA", "MG",
        "AL", "SI", "P",  "S",  "CL", "AR", "K",  "CA", "SC", "TI", "V",  "CR",
        "MN", "FE", "CO", "NI", "CU", "ZN", "GA", "GE", "AS", "SE", "BR", "KR",
        "RB", "SR", "Y",  "ZR", "NB", "MO", "TC", "RU", "RH", "PD", "AG", "CD",
        "IN", "SN", "SB", "TE", "I",  "XE", "CS", "BA", "LA", "CE", "PR", "ND",
        "PM", "SM", "EU", "GD", "TB", "DY", "HO", "ER", "TM", "YB", "LU", "HF",
        "TA", "W",  "RE", "OS", "IR", "PT", "AU", "HG", "TL", "PB", "BI", "PO",
        "AT", "RN", "FR", "RA", "AC", "TH", "PA", "U",  "NP", "PU", "AM", "CM",
        "BK", "CF", "ES", "FM", "MD", "NO", "LR", "RF", "DB", "SG", "BH", "HS",
        "MT", "DS", "RG", "CN", "NH", "FL", "MC", "LV", "TS", "OG"};
    set<string> se;
    long long eco = 118;
    for (int i = 0; i < eco; ++i) {
      se.insert(el[i]);
    }
    string s;
    cin >> s;
    vector<long long> x(s.length() + 2, 0);
    x[0] = 1;
    for (long long i = 0; i < s.length(); ++i) {
      if (!x[i]) continue;
      for (long long j = 0; j < eco; ++j) {
        if (el[j].length() == 1) {
          if (el[j][0] == s[i]) {
            x[i + 1] = 1;
          }
        } else if (i < s.length() - 1) {
          if ((el[j][0] == s[i]) && (el[j][1] == s[i + 1])) {
            x[i + 2] = 2;
          }
        }
      }
    }
    if (x[s.length()])
      cout << "YES\n";
    else
      cout << "NO\n";
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  Solution ob;
  long long t = 1;
  for (long long t1 = 0; t1 < t; ++t1) {
    ob.SolutionFunc();
  }
  return 0;
}