#include <bits/stdc++.h>
using namespace std;
int main() {
  map<char, int> mp;
  int c, C;
  string s;
  cin >> s;
  mp['B'] = 1, mp['C'] = 1, mp['D'] = 1, mp['E'] = 1, mp['F'] = 1, mp['G'] = 1,
  mp['J'] = 1, mp['K'] = 1;
  mp['L'] = 1, mp['P'] = 1, mp['R'] = 1, mp['S'] = 1, mp['Z'] = 1, mp['N'] = 1,
  mp['Q'] = 1;
  for (int j = 0; j < s.size(); j++) {
    if (mp[s[j]] == 1) {
      cout << "NO";
      return 0;
    }
  }
  if (s.size() % 2 == 0)
    c = s.size() / 2, C = s.size() - 1;
  else
    c = (s.size() / 2) - 1, C = s.size() - 1;
  for (int j = 0; j < c; j++) {
    if (s[j] == s[C])
      C--;
    else {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
