#include <bits/stdc++.h>
using namespace std;
int a[100010];
char s[100010];
int main() {
  int n, i, j;
  cin >> s;
  n = strlen(s);
  for (i = 0; i < n; i++) {
    if (s[i] == 'p' || s[i] == 'q') a[i] = 1;
  }
  for (i = 0; i < n; i++) {
    if (a[i] != a[n - i - 1]) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}
