#include <bits/stdc++.h>
using namespace std;
char a[1000005], b[1000005];
int main() {
  cin >> a + 1;
  int n = strlen(a + 1);
  memcpy(b, a, sizeof(a));
  reverse(b + 1, b + n + 1);
  for (int i = 1; i <= n; i++) {
    if (b[i] == 'b')
      if (a[i] != 'd') {
        puts("NO");
        return 0;
      }
    if (b[i] == 'd')
      if (a[i] != 'b') {
        puts("NO");
        return 0;
      }
    if (b[i] == 'p')
      if (a[i] != 'q') {
        puts("NO");
        return 0;
      }
    if (b[i] == 'q')
      if (a[i] != 'p') {
        puts("NO");
        return 0;
      }
  }
  puts("YES");
}
