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>
const int inf = 1e9;
const long long INF = 1e15;
template <typename A0>
void print(A0 a0) {
  std::cout << a0 << '\n';
}
template <typename A0, typename... ARGS>
void print(A0 a0, ARGS... rest) {
  std::cout << a0 << ' ';
  print(rest...);
}
int dx[] = {0, 0, -1, 1}, dy[] = {1, -1, 0, 0};
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
string ele =
    "HHeLiBeBCNOFNeNaMgAlSiPSClArKCaScTiVCrMnFeCoNiCuZnGaGeAsSeBrKrRbSrYZrNbMoT"
    "cRuRhPdAgCdInSnSbTeI"
    "XeCsBaLnHfTaWReOsIrPtAuHgTlPbBiPoAtRnFrRaAnRfDbSgBhHsMtDsRgCnNhFlMcLvTsOgL"
    "nLaCePrNdPmSmEuGdTbDy"
    "HoErTmYbLuAnAcThPaUNpPuAmCmBkCfEsFmMdNoLr";
void solve() {
  set<string> element;
  int i, n = ele.size();
  for (i = 0; i < n; i++) {
    if (i + 1 < n && 'a' <= ele[i + 1] && ele[i + 1] <= 'z') {
      string t = ele.substr(i, 2);
      t[1] += 'A' - 'a';
      element.insert(t);
      i++;
    } else {
      string t = ele.substr(i, 1);
      element.insert(t);
    }
  }
  string s;
  cin >> s;
  n = s.size();
  vector<int> dp(n + 1, 0);
  for (i = n; i >= 0; i--) {
    if (i == n) {
      dp[i] = 1;
      continue;
    }
    if (string t = s.substr(i, 1); element.find(t) != element.end())
      dp[i] |= dp[i + 1];
    if (i + 1 < n)
      if (string t = s.substr(i, 2); element.find(t) != element.end())
        dp[i] |= dp[i + 2];
  }
  if (dp[0])
    cout << "YES";
  else
    cout << "NO";
}
int main() {
  {};
  solve();
}