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;
long long mi(long long n, long long m) {
  long long pw = n % m;
  long long ex = m - 2;
  long long ans = 1;
  while (ex) {
    if (ex & 1) ans = ans * pw % m;
    pw = pw * pw % m;
    ex >>= 1;
  }
  return ans % 1000000007;
}
long long pw(long long a, long long n) {
  if (n < 0) return 0;
  if (n == 0) return 1;
  long long pw = a;
  long long ex = n;
  long long ans = 1;
  while (ex) {
    if (ex & 1) ans = ans * pw;
    pw = pw * pw;
    ex >>= 1;
  }
  return ans;
}
long long pwm(long long a, long long n) {
  long long pw = a % 1000000007;
  long long ex = n;
  long long ans = 1;
  while (ex) {
    if (ex & 1) ans = ans * pw % 1000000007;
    pw = pw * pw % 1000000007;
    ex >>= 1;
  }
  return ans % 1000000007;
}
template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
  for (T &t : v) is >> t;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  for (const T &t : v) {
    os << t << " ";
  }
  os << '\n';
  return os;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long max(long long a, long long b) { return a > b ? a : b; }
long long min(long long a, long long b) { return a < b ? a : b; }
long long Abs(long long x) { return x > 0 ? x : (-x); }
long long Ceil(long long a, long long b) { return a / b + (a % b != 0); }
long long dx[] = {1, 0, -1, 0};
long long dy[] = {0, 1, 0, -1};
long long X[] = {2, 1, -1, -2, -2, -1, 1, 2};
long long Y[] = {1, 2, 2, 1, -1, -2, -2, -1};
struct comp {
  bool operator()(const pair<long long, long long> &a,
                  const pair<long long, long long> &b) const {
    if (a.first > b.first) return true;
    if (a.first < b.first) return false;
    if (a.second < b.second) return true;
    return false;
  }
};
void solve() {
  string s;
  cin >> s;
  if (s.length() == 1 or s.length() == 2) {
    cout << "YES";
    return;
  }
  for (long long i = 0; i < s.length() - 2; ++i) {
    long long x = s[i] - 'A';
    long long y = s[i + 1] - 'A';
    long long z = (x + y) % 26;
    if (s[i + 2] - 'A' != z) {
      cout << "NO";
      return;
    }
  }
  cout << "YES";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  solve();
}