#include <bits/stdc++.h>
using namespace std;
char a[111111];
long long s;
int main() {
  gets(a);
  if (strlen(a) % 2 == 1)
    cout << "NO" << endl;
  else {
    for (long long i = 0, j = strlen(a) - 1;
         i < strlen(a) / 2 && j >= strlen(a) / 2; i++, j--)
      if ((a[i] == 'b' && a[j] == 'd') || (a[i] == 'd' && a[j] == 'b') ||
          (a[i] == 'p' && a[j] == 'q') || (a[i] == 'q' && a[j] == 'p'))
        s++;
    if (s == strlen(a) / 2)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
