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 pll = pair<long long, long long>;
using vl = vector<long long>;
using vpll = vector<pll>;
using mll = map<long long, long long>;
using mcl = map<char, long long>;
using msl = map<string, long long>;
using sl = set<long long>;
using sc = set<char>;
const int N = 1e6 + 5;
const int mod = (int)1e9 + 7;
long long arr[N];
long long sumd(long long a, long long b) {
  return (((a % mod) + (b % mod)) % mod);
}
long long muld(long long a, long long b) {
  return (((a % mod) * (b % mod)) % mod);
}
long long subd(long long a, long long b) {
  return (((a % mod) - (b % mod) + mod) % mod);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long tc, n, x, i, j;
  string str;
  cin >> str;
  n = ((long long)(str).size());
  if (n <= 2)
    cout << "YES"
         << "\n";
  else {
    long long fib[n];
    for (i = 0; i < n; i++) {
      fib[i] = str[i] - 'A';
    }
    for (i = 2; i < n; i++) {
      x = (fib[i - 1] + fib[i - 2]) % 26;
      if (x != fib[i]) {
        cout << "NO"
             << "\n";
        return 0;
      }
    }
    cout << "YES"
         << "\n";
  }
  return 0;
}