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 PII = pair<int, int>;
using VI = vector<int>;
void prec() {}
void solve(istream &cin, ostream &cout) {
  string s;
  cin >> s;
  bool ok = true;
  for (size_t i = 2; i < s.size(); i++) {
    int a = s[i - 2] - 'A';
    int b = s[i - 1] - 'A';
    int c = s[i] - 'A';
    if ((a + b) % 26 != c) ok = false;
  }
  cout << (ok ? "YES" : "NO") << '\n';
}
struct CFibonacciWords {
  void solve(std::istream &in, std::ostream &out) { ::solve(in, out); }
};
int main() {
  prec();
  CFibonacciWords solver;
  std::istream &in(std::cin);
  std::ostream &out(std::cout);
  solver.solve(in, out);
  return 0;
}