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 M = 1010;
const long long N = 1010;
const long long mod = 1e9 + 7;
long long INF = (long long)1e8;
long long dp[N][N][2];
long long add(long long a, long long b) { return (a % mod + b % mod) % mod; }
void solve() {
  string s;
  cin >> s;
  if (s.size() == 1 || s.size() == 2) {
    cout << "YES" << endl;
    return;
  }
  long long a = s[0] - 'A';
  long long b = s[1] - 'A';
  long long n = s.size();
  for (long long i = 2; i < n; i++) {
    char c = s[i] - 'A';
    if (c == (a + b) % 26) {
      a = b;
      b = c;
    } else {
      cout << "NO" << endl;
      return;
    }
  }
  cout << "YES" << endl;
}
signed main() {
  long long t = 1;
  for (long long i = 1; i <= t; i++) {
    solve();
  }
  return 0;
}