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;
long long int mod = 998244353;
long long int MOD = 1e9 + 7;
long long int INF = 1e18;
long double PI = 3.14159265358979323846264338327950;
long long int dx[] = {1, -1, 0, 0};
long long int dy[] = {0, 0, 1, -1};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  for (int i = 2; i < s.size(); i++) {
    long long int x, y, z;
    x = s[i - 2] - 'A';
    y = s[i - 1] - 'A';
    z = s[i] - 'A';
    if ((x + y) % 26 != z) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES";
  return 0;
}