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;
bool possible1[256];
bool possible2[256][256];
bool visited[15];
char str[15];
int main() {
  memset(possible1, false, sizeof(possible1));
  memset(possible2, false, sizeof(possible2));
  scanf(" %s", str);
  possible1['H'] = true;
  possible1['B'] = true;
  possible1['C'] = true;
  possible1['N'] = true;
  possible1['O'] = true;
  possible1['F'] = true;
  possible1['P'] = true;
  possible1['S'] = true;
  possible1['V'] = true;
  possible1['Y'] = true;
  possible1['I'] = true;
  possible1['W'] = true;
  possible1['U'] = true;
  possible1['K'] = true;
  possible2['H']['E'] = true;
  possible2['L']['I'] = true;
  possible2['B']['E'] = true;
  possible2['N']['E'] = true;
  possible2['N']['A'] = true;
  possible2['M']['G'] = true;
  possible2['A']['L'] = true;
  possible2['S']['I'] = true;
  possible2['C']['L'] = true;
  possible2['A']['R'] = true;
  possible2['C']['A'] = true;
  possible2['S']['C'] = true;
  possible2['T']['I'] = true;
  possible2['C']['R'] = true;
  possible2['M']['N'] = true;
  possible2['F']['E'] = true;
  possible2['C']['O'] = true;
  possible2['N']['I'] = true;
  possible2['C']['U'] = true;
  possible2['Z']['N'] = true;
  possible2['G']['A'] = true;
  possible2['G']['E'] = true;
  possible2['A']['S'] = true;
  possible2['S']['E'] = true;
  possible2['B']['R'] = true;
  possible2['K']['R'] = true;
  possible2['R']['B'] = true;
  possible2['S']['R'] = true;
  possible2['Z']['R'] = true;
  possible2['N']['B'] = true;
  possible2['M']['O'] = true;
  possible2['T']['C'] = true;
  possible2['R']['U'] = true;
  possible2['R']['H'] = true;
  possible2['P']['D'] = true;
  possible2['A']['G'] = true;
  possible2['C']['D'] = true;
  possible2['I']['N'] = true;
  possible2['S']['N'] = true;
  possible2['S']['B'] = true;
  possible2['T']['E'] = true;
  possible2['X']['E'] = true;
  possible2['C']['S'] = true;
  possible2['B']['A'] = true;
  possible2['L']['A'] = true;
  possible2['C']['E'] = true;
  possible2['P']['R'] = true;
  possible2['N']['D'] = true;
  possible2['P']['M'] = true;
  possible2['S']['M'] = true;
  possible2['E']['U'] = true;
  possible2['G']['D'] = true;
  possible2['T']['B'] = true;
  possible2['D']['Y'] = true;
  possible2['H']['O'] = true;
  possible2['E']['R'] = true;
  possible2['T']['M'] = true;
  possible2['Y']['B'] = true;
  possible2['L']['U'] = true;
  possible2['H']['F'] = true;
  possible2['T']['A'] = true;
  possible2['R']['E'] = true;
  possible2['O']['S'] = true;
  possible2['I']['R'] = true;
  possible2['P']['T'] = true;
  possible2['A']['U'] = true;
  possible2['H']['G'] = true;
  possible2['T']['L'] = true;
  possible2['P']['B'] = true;
  possible2['B']['I'] = true;
  possible2['P']['O'] = true;
  possible2['A']['T'] = true;
  possible2['R']['N'] = true;
  possible2['F']['R'] = true;
  possible2['R']['A'] = true;
  possible2['A']['C'] = true;
  possible2['T']['H'] = true;
  possible2['P']['A'] = true;
  possible2['N']['P'] = true;
  possible2['P']['U'] = true;
  possible2['A']['M'] = true;
  possible2['C']['M'] = true;
  possible2['B']['K'] = true;
  possible2['C']['F'] = true;
  possible2['E']['S'] = true;
  possible2['F']['M'] = true;
  possible2['M']['D'] = true;
  possible2['N']['O'] = true;
  possible2['L']['R'] = true;
  possible2['R']['F'] = true;
  possible2['D']['B'] = true;
  possible2['S']['G'] = true;
  possible2['B']['H'] = true;
  possible2['H']['S'] = true;
  possible2['M']['T'] = true;
  possible2['D']['S'] = true;
  possible2['R']['G'] = true;
  possible2['C']['N'] = true;
  possible2['N']['H'] = true;
  possible2['F']['L'] = true;
  possible2['M']['C'] = true;
  possible2['L']['V'] = true;
  possible2['T']['S'] = true;
  possible2['O']['G'] = true;
  memset(visited, 0, sizeof(visited));
  queue<int> q;
  q.push(0);
  visited[0] = true;
  int len = strlen(str);
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    if (u == len) {
      break;
    }
    if (possible1[str[u]]) {
      if (!visited[u + 1]) {
        visited[u + 1] = true;
        q.push(u + 1);
      }
    }
    if (u + 1 < len) {
      if (possible2[str[u]][str[u + 1]]) {
        if (!visited[u + 2]) {
          visited[u + 2] = true;
          q.push(u + 2);
        }
      }
    }
  }
  if (visited[len]) {
    printf("YES");
  } else {
    printf("NO");
  }
  return 0;
}