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;
template <typename Arg1>
void debug(const char* name, Arg1&& arg1) {
  cerr << name << ": " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void debug(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << ": " << arg1 << " | ";
  debug(comma + 1, args...);
}
const int INF = 1000000000 + 5;
const int N = 1000 + 5;
const int M = 5e5 + 5;
const long long oo = 1e18 + 5;
const int mod = 998244353;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  int n = (int)s.size();
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    a[i] = s[i] - 'A';
  }
  if (n <= 2) {
    return cout << "YES", 0;
  }
  for (int i = 2; i < n; ++i) {
    if ((a[i - 2] + a[i - 1]) % 26 != a[i]) {
      return cout << "NO", 0;
    }
  }
  cout << "YES";
  return 0;
}