import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    [n,a,b,c,d] <- getIntList
    s <- getLine
    let  check1 = not . isInfixOf "##" $ drop (min a b) $ take (max c d) s
         check2 = isInfixOf "..." $ drop ((max a b) - 2) $ take ((min c d) + 1) s
         ans | (b-a)*(d-c) > 0 = if check1 then "Yes" else "No"
             | otherwise = if check1 && check2 then "Yes" else "No"
    putStrLn ans