#include <bits/stdc++.h>
using namespace std;
char a[5];
int n, i, l = 1, r = 4;
int main() {
  for (i = 1; i <= 4; i++) cin >> a[i];
  while (l < r) {
    if (a[l] == 'b' && a[r] == 'd') {
      l++;
      r--;
      continue;
    }
    if (a[l] == 'd' && a[r] == 'b') {
      l++;
      r--;
      continue;
    }
    if (a[l] == 'p' && a[r] == 'q') {
      l++;
      r--;
      continue;
    }
    if (a[l] == 'q' && a[r] == 'p') {
      l++;
      r--;
      continue;
    }
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  return 0;
}
