{-# 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
  BS.putStrLn s
  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',b') == (c,d) -> return True 
     | a' < c && b' < d && a' /= b' && isD s a' && isD s b' -> move s (a',b') (c,d)
     | otherwise -> []
    
isS s a = BS.index s (a-1) == '#'
isD s a = BS.index s (a-1) == '.'