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