#include <bits/stdc++.h>
using namespace std;
bool isp(string s) {
  int len = s.length();
  if (len % 2 == 0) {
    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;
  } else {
    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 if (i == len % 2 + 1) {
        return false;
      } else {
        return false;
      }
    }
    return true;
  }
}
int main() {
  string s;
  cin >> s;
  if (isp(s)) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
