#include <bits/stdc++.h>
using namespace std;
bool isp(string s) {
  int len = s.length();
  for (int i = 0; i < len; i++) {
    if ((s[i] == 'b' && s[len - 1 - i] == 'd') ||
        (s[i] == 'd' && s[len - 1 - i] == 'b') ||
        (s[i] == 'q' && s[len - 1 - i] == 'p') ||
        (s[i] == 'p' && s[len - 1 - i] == 'q')) {
      continue;
    } else {
      return false;
    }
  }
  return true;
}
int main() {
  string s;
  cin >> s;
  if (isp(s)) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
