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 P = 1e9 + 7, INF = 0x3f3f3f3f;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long qpow(long long a, long long n) {
  long long r = 1 % P;
  for (a %= P; n; a = a * a % P, n >>= 1)
    if (n & 1) r = r * a % P;
  return r;
}
long long inv(long long first) {
  return first <= 1 ? 1 : inv(P % first) * (P - P / first) % P;
}
inline int rd() {
  int first = 0;
  char p = getchar();
  while (p < '0' || p > '9') p = getchar();
  while (p >= '0' && p <= '9') first = first * 10 + p - '0', p = getchar();
  return first;
}
const int N = 1e6 + 50;
string f[] = {"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", "HF", "TA", "W",  "RE", "OS", "IR", "PT", "AU", "HG", "TL",
              "PB", "BI", "PO", "AT", "RN", "FR", "RA", "RF", "DB", "SG", "BH",
              "HS", "MT", "DS", "RG", "CN", "NH", "FL", "MC", "LV", "TS", "OG",
              "LA", "CE", "PR", "ND", "PM", "SM", "EU", "GD", "TB", "DY", "HO",
              "ER", "TM", "YB", "LU", "AC", "TH", "PA", "U",  "NP", "PU", "AM",
              "CM", "BK", "CF", "ES", "FM", "MD", "NO", "LR"};
string s;
int dfs(int d, int len) {
  if (!len) return 1;
  for (auto &t : f)
    if (t.size() <= len && s.substr(d, t.size()) == t) {
      if (dfs(d + t.size(), len - t.size())) return 1;
    }
  return 0;
}
int main() {
  sort(f, f + 118);
  cin >> s;
  puts(dfs(0, s.size()) ? "YES" : "NO");
}