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 n, fl = 0;
char s[105];
char ta[1005] =
    "HHeLiBeBCNOFNeNaMgAlSiPSClArKCaScTiVCrMnFeCoNiCuZnGaGeAsSeBrKrRbSrYZrNbMoT"
    "cRuRhPdAgCdInSnSbTeIXeCsBaLaCePrNdPmSmEuGdTbDyHoErTmYbLuHfTaWReOsIrPtAuHgT"
    "lPbBiPoAtRnFrRaAcThPaUNpPuAmCmBkCfEsFmMdNoLrRfDbSgBhHsMtDsRgCnNhFlMcLvTsO"
    "g";
void dfs(int dep) {
  if (dep == n + 1) {
    fl = 1;
    return;
  }
  for (int i = 0; ta[i]; i++)
    if (ta[i + 1] >= 'a' && ta[i + 1] <= 'z') {
      if (dep < n && ta[i] == s[dep] && ta[i + 1] - 'a' + 'A' == s[dep + 1])
        dfs(dep + 2);
    } else {
      if (ta[i] == s[dep]) dfs(dep + 1);
    }
}
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  dfs(1);
  if (fl)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}