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() {
  map<char, int> m;
  string s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  for (int i = 0; i < 26; i++) {
    m[s[i]] = i;
  }
  vector<long long> a;
  string t;
  cin >> t;
  for (int i = 0; i < t.size(); i++) {
    a.push_back(m[t[i]]);
  }
  if (t.size() < 3) {
    cout << "YES";
    return 0;
  }
  long long l1 = a[0], l2 = a[1], f = 0;
  for (int i = 2; i < a.size(); i++) {
    if ((l1 + l2) % 26 != a[i] % 26) {
      f = 1;
      break;
    }
    long long r = l2;
    l2 = a[i] % 26;
    l1 = r;
  }
  if (f == 0) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}