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;
int main() {
  int sum = 0, i, k = 1;
  char str[12] = "\0";
  int idx[12] = {0};
  cin >> str;
  int len = strlen(str);
  for (i = 0; str[i]; i++) {
    idx[i] = str[i] - 'A';
  }
  bool tar = true;
  if (len <= 2) {
    k = 1;
  } else {
    for (i = 2; str[i]; i++) {
      if (idx[i] != (idx[i - 1] + idx[i - 2]) % 26) {
        k = 0;
        break;
      }
    }
  }
  if (k)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}