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;
const long long INF = (1LL << 60) - 1;
const long long maxN = 1000001;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    string s;
    cin >> s;
    if (((long long)(s).size()) < 2) {
      cout << "YES"
           << "\n";
      return 0;
    }
    map<char, long long> fre;
    long long num = 1;
    for (char c = 'A'; c <= 'Z'; ++c) {
      fre[c] = num++;
    }
    long long chk = 0;
    for (long long i = 2; i < ((long long)(s).size()); ++i) {
      long long nn = fre[s[i]];
      long long a = fre[s[i - 1]];
      long long b = fre[s[i - 2]];
      long long sum = a + b;
      sum--;
      if (sum > 26) {
        sum = sum % 26;
      }
      if (nn == sum)
        continue;
      else
        chk = 1;
    }
    if (chk) {
      cout << "NO"
           << "\n";
    } else
      cout << "YES"
           << "\n";
  }
}