#include <iostream>
#include <cstdio>
#include<bits/stdc++.h>
using namespace std;
int m,n;
string a,b;
char czy(char x){
	if(x=='d'){
		return x-2;
	}
	if(x=='b'){
		return x+2;
	} 
	if(x=='p'){
		return x+1;
	}
	if(x=='q'){
		return x-1;
	}
}
int main(){
	while((b=getchar())!='\n'){
		cin>>b;
		a[++m]=b;
	}
	if(m%2!=0){
		cout<<"No"; 
	} 
	for(int i=m;i>=1;i--){
		if(czy(a[i])!=a[m-i+1]){
			cout<<"No";
			return 0;
     	}
	}
	cout<<"Yes"<<endl;
	return 0;
} 