#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int main() {
  int standard[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};
  char str[maxn];
  while (~scanf("%s", str)) {
    bool flag = true;
    int len = strlen(str);
    for (int i = 0; i <= len / 2; i++) {
      if (str[i] != str[len - i - 1] || standard[str[i] - 'A'] != 1) {
        flag = false;
        break;
      }
    }
    if (flag)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
