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() {
  char a[11];
  cin >> a;
  long long int i;
  if (strlen(a) <= 2) {
    cout << "YES";
    return 0;
  }
  long long int b, c, f;
  f = 0;
  b = a[0] - 65;
  c = a[1] - 65;
  for (i = 2; i < strlen(a); i++) {
    if ((b + c) % 26 == (a[i] - 65)) {
      f = 0;
      b = c;
      c = a[i] - 65;
    } else {
      f = 1;
      break;
    }
  }
  if (f == 1)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}