#include <bits/stdc++.h>
using namespace std;
bool check(char c) {
  if (c == 'B' || c == 'C' || c == 'D' || c == 'N' || c == 'E' || c == 'Q' ||
      c == 'F' || c == 'G' || c == 'J' || c == 'K' || c == 'L' || c == 'P' ||
      c == 'R' || c == 'S' || c == 'Z')
    return false;
  return true;
}
int main() {
  string str;
  cin >> str;
  string ans = "YES";
  if (str.length() == 1) {
    if (!check(str[0])) ans = "NO";
  }
  int j = str.length() - 1;
  for (int i = 0; i < str.length() / 2; i++) {
    if (str[i] != str[j--]) {
      ans = "NO";
      break;
    }
    if (!check(str[i])) {
      ans = "NO";
      break;
    }
  }
  if (!check(str[str.length() / 2])) ans = "NO";
  cout << ans << endl;
  return 0;
}
