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;
using ll = long long;
using ld = long double;
const long long mod = 998244353;
using pii = pair<long long, long long>;
using vi = vector<long long>;
using vvi = vector<vector<long long>>;
using vpii = vector<pii>;
template <class T>
T cmax(T &a, T b) {
  return a = max(a, b);
}
template <class T>
T cmin(T &a, T b) {
  return a = min(a, b);
}
ll acc(const vector<long long> &a) {
  return accumulate(a.begin(), a.end(), 0LL);
}
double acc(const vector<double> &a) {
  return accumulate(a.begin(), a.end(), 0.0);
}
ll qpow(ll a, ll x, ll p = mod) {
  ll res = 1 % p;
  a = a % p;
  for (; x; x >>= 1, a = a * a % p)
    if (x & 1) res = (res * a) % p;
  return res;
}
const long long inf = 1e9;
void solve() {}
signed main() {
  string s;
  cin >> s;
  vi a(s.size());
  long long ok = 1;
  for (long long i = (0); i < (long long)(long long)a.size(); ++i) {
    a[i] = s[i] - 'A';
    if (i >= 2) {
      if ((a[i - 2] + a[i - 1]) % 26 != a[i]) ok = 0;
    }
  }
  cout << (ok ? "YES\n" : "NO\n");
  return 0;
}