#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  char a[100010];
  int len = s.size();
  int tot = 0;
  for (int i = len - 1; i >= 0; i--) {
    a[tot++] = s[i];
  }
  if (len % 2 == 1) cout << "NO" << endl;
  if (len % 2 == 0) {
    int ans = 0;
    for (int i = 0; i < len; i++) {
      if (a[i] == 'b' && s[i] == 'd') ans += 1;
      if (a[i] == 'd' && s[i] == 'b') ans += 1;
      if (a[i] == 'p' && s[i] == 'q') ans += 1;
      if (a[i] == 'q' && s[i] == 'p') ans += 1;
    }
    if (ans == len)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
