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;
template <typename T>
void chkmax(T& x, T y) {
  if (x < y) x = y;
}
template <typename T>
void chkmin(T& x, T y) {
  if (x > y) x = y;
}
inline int read() {
  int x = 0;
  char c = getchar();
  bool f = 0;
  while (c < 48) f |= c == '-', c = getchar();
  while (c > 47) x = x * 10 + (c ^ 48), c = getchar();
  return f ? -x : x;
}
char str[1010];
int A[1010];
void solve() {
  scanf("%s", str + 1);
  int n = strlen(str + 1);
  bool flg = 1;
  for (int i = (1), iend = (n); i <= iend; ++i) A[i] = str[i] - 'A';
  for (int i = (3), iend = (n); i <= iend; ++i) {
    flg &= A[i] == (A[i - 1] + A[i - 2]) % 26;
  }
  puts(flg ? "YES" : "NO");
}
signed main() {
  solve();
  return 0;
}