using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Numerics;




namespace contest
{

    class contest
    {


        static void Main(string[] args)
        {


      


            string s = Console.ReadLine();

            var cp = s.Reverse().ToArray();

            bool ok = true;
            for(int i =0; i<s.Length; i++)
            {
                if(!check(cp[i], s[i]))
                {
                    ok = false;
                    break;
                }
            }

            if (ok) Console.WriteLine("YES");
            else Console.WriteLine("NO");



        }

		public static bool check(char a, char b)
        {
            if (a == 'b' && b == 'd') return true;
            if (a == 'd' && b == 'b') return true;
            if (a == 'p' && b == 'q') return true;
            if (a == 'q' && b == 'p') return true;
            
            return false;
        }
        

    }


   

    
}
