#include <bits/stdc++.h>
using namespace std;
int main() {
  char n[100001];
  cin >> n;
  bool ans = 0;
  int l = strlen(n);
  for (int i = 0; i <= l; ++i) {
    if (n[i] == 'p' && n[l - i] == 'q') ans = 1;
    if (n[l - i] == 'p' && n[i] == 'q') ans = 1;
    if (n[l - i] == 'd' && n[i] == 'b') ans = 1;
    if (n[i] == 'd' && n[l - i] == 'b') ans = 1;
  }
  if (ans)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
