#include <bits/stdc++.h>
using namespace std;
char input[100000];
int main(int argc, char** argv) {
  int i, j, k, lg, check, table[26], check1;
  for (i = 0; i < 26; i++) {
    table[i] = 0;
  }
  table[0] = 1;
  table[7] = 1;
  table[8] = 1;
  table[12] = 1;
  table[14] = 1;
  table[19] = 1;
  table[20] = 1;
  table[21] = 1;
  table[22] = 1;
  table[23] = 1;
  table[24] = 1;
  while (scanf(" %s", input) == 1) {
    lg = strlen(input);
    check1 = 1;
    check = 1;
    for (i = 0; i < lg / 2; i++) {
      if (input[i] != input[lg - 1 - i]) {
        check = 0;
      }
    }
    for (i = 0; i < lg; i++) {
      if (table[input[i] % 65] != 1) {
        check1 = 0;
      }
    }
    if (check * check1) {
      printf("%s\n", "YES");
    } else {
      printf("%s\n", "NO");
    }
  }
  return 0;
}
