#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[100005];
  cin >> a;
  int s = strlen(a);
  int sum = 0;
  for (int i = 0; i < s; i++) {
    if (a[i] == 'p') sum++;
    if (a[i] == 'q') sum--;
    if (a[i] == 'b') sum++;
    if (a[i] == 'd') sum--;
  }
  if (sum == 0)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
