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

is_mirror_string :: String -> Bool
is_mirror_string s = _ims s (length s) "" 0

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