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;
int32_t main() {
  string s;
  cin >> s;
  map<char, int> mp;
  for (char c : s) {
    mp[c] = (int)(c - 'A');
  }
  bool ok = true;
  for (int i = 2; i < s.length(); i++) {
    if (mp[s[i]] != (mp[s[i - 1]] + mp[s[i - 2]]) % 26) {
      ok = false;
      break;
    }
  }
  if (ok)
    cout << "YES"
         << "\n";
  else
    cout << "NO"
         << "\n";
}