_ims :: String -> String -> Bool
_ims s t
  | s == t = True
  | ls <= lt = False
  | h == 'b' = _ims ts ('d':t)
  | h == 'd' = _ims ts ('b':t)
  | h == 'p' = _ims ts ('q':t)
  | True = _ims ts ('p':t)
    where
      ls = length s
      lt = length t
      h:ts = s

is_mirror_string :: String -> Bool
is_mirror_string s = _ims s ""

main :: IO ()
main = do
  s <- getLine
  putStrLn $ if (is_mirror_string s) then "Yes" else "No"
