#include <bits/stdc++.h>
using namespace std;
bool alph[26] = {1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1,
                 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0};
bool check(string s) {
  for (int i = 0; i < s.length(); i++)
    if (!alph[s[i] - 'A']) return false;
  return true;
}
int main() {
  string s;
  cin >> s;
  string t = s;
  reverse(s.begin(), s.end());
  if (s == t && check(s))
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
