{-# LANGUAGE MultiWayIf #-}
import Control.Monad
import qualified Data.ByteString.Char8 as BS

main = do
  [n,a,b,c,d] <- map (read . BS.unpack) . BS.words <$> BS.getLine
  s <- BS.getLine
  putStrLn $ if null (move s (a,b) (c,d)) then "No" else "Yes"
  
move s (a,b) (c,d) = do
  (a',b') <- [(a+1,b),(a+2,b),(a,b+1),(a,b+2)]
  if | a' > c || b' > d -> []
     | BS.index s (a'-1) == '#' -> []
     | BS.index s (b'-1) == '#' -> []
     | (a',b') == (c,d) -> return True
     | otherwise -> move s (a',b') (c,d)