#include <bits/stdc++.h>
using namespace std;
string n, s;
int main() {
  cin >> n;
  s = n;
  swap(n[0], n[3]);
  swap(n[1], n[2]);
  for (int i = 0; i < n.size(); i++) {
    if (n[i] == 'b')
      n[i] = 'd';
    else if (n[i] == 'd')
      n[i] = 'b';
    else if (n[i] == 'p')
      n[i] = 'q';
    else if (n[i] == 'q')
      n[i] = 'p';
  }
  if (s == n)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
