#include <bits/stdc++.h>
using namespace std;
int main() {
  string n;
  cin >> n;
  string a = n;
  int l = 1e5;
  for (int i = 0; i <= l; ++i) {
    if (n[i] == 'p')
      a[i] == 'q';
    else if (n[i] == 'q')
      a[i] == 'p';
    else if (n[i] == 'b')
      a[i] == 'd';
    else if (n[i] == 'd')
      a[i] == 'b';
    if (n[i] == ' ') break;
  }
  if (a == n)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
