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