#include <bits/stdc++.h>
using namespace std;
string t = "BCDGJOPQRSU";
int main() {
  string s;
  while (cin >> s) {
    int n = s.length();
    int c = 0;
    for (int i = 0; i < n; i++)
      if (t.find(s[i]) != string::npos)
        c++;
      else
        c--;
    cout << (abs(c) == n ? "YES\n" : "NO\n");
  }
  return 0;
}
