#include <bits/stdc++.h>
using namespace std;
bool b[26] = {1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1,
              1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1};
int main() {
  bool ok1 = 0, ok2 = 0;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++)
    if (b[s[i] - 'A'] == 1)
      ok1 = 1;
    else
      ok2 = 1;
  if (ok1 + ok2 == 1)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
