#include <bits/stdc++.h>
using namespace std;
int arr[100] = {};
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  string s;
  cin >> s;
  string f;
  int r = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    f.push_back(s[i]);
    if (s[i] == 'B' || s[i] == 'C' || s[i] == 'D' || s[i] == 'E' ||
        s[i] == 'F' || s[i] == 'G' || s[i] == 'J' || s[i] == 'K' ||
        s[i] == 'L' || s[i] == 'N' || s[i] == 'P' || s[i] == 'Q' ||
        s[i] == 'R' || s[i] == 'S' || s[i] == 'Z')
      r = 1;
  }
  if (s == f && r == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
