#include <bits/stdc++.h>
using namespace std;
bool viz[] = {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};
int main() {
  cin.sync_with_stdio(false);
  char s[100005];
  int len, i, j;
  cin >> (s + 1);
  len = strlen(s + 1);
  for (i = 1; i <= len; i++)
    if (!viz[s[i] - 'A']) {
      cout << "NO\n";
      return 0;
    }
  j = len;
  i = 1;
  while (i <= j && s[i] == s[j]) {
    j--;
    i++;
  }
  if (i > j)
    cout << "YES";
  else
    cout << "NO";
  cout << "\n";
  return 0;
}
