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 sq(long long x) {
  long long k = sqrt(x);
  while (k * k < x) {
    k++;
  };
  while (k * k > x) {
    k--;
  }
  return k;
};
long long cb(long long x) {
  long long k = cbrt(x);
  while (k * k * k < x) {
    k++;
  };
  while (k * k * k > x) {
    k--;
  }
  return k;
};
const long long INF = (long long)(1e17);
const double PI = 3.141592653589793;
long long dx[4] = {-1, 0, 1, 0};
long long dy[4] = {0, 1, 0, -1};
string path = "URDL";
void solve() {
  string x;
  cin >> x;
  long long sum = 0;
  if ((long long)x.size() <= 2) {
    cout << "YES\n";
    return;
  }
  for (long long i = 2; i < (long long)x.size(); i++) {
    if ((x[i] - 'A') != ((x[i - 1] - 'A') + (x[i - 2] - 'A')) % 26) {
      cout << "NO\n";
      return;
    }
  }
  cout << "YES\n";
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  solve();
  return 0;
}