import Control.Monad
import Data.List (sort)

readIntLine :: IO ([Int])
readIntLine = do
    x <- getLine
    return $ map (read :: String -> Int) $ words x


main :: IO ()
main = do
    [n,a,b,c,d] <- readIntLine
    s <- getLine
    putStrLn $ if solve n a b c d s then "Yes"
                                    else "No"

contains [] = False
contains [_] = False
contains ('#':'#':xs) = True
contains (x:xs) = contains xs

contains3 [] = False
contains3 [_] = False
contains3 [_,_] = False
contains3 ('.':'.':'.':xs) = True
contains3 (x:xs) = contains3 xs


solve n a b c d s =
    if s!!(c-1) == '#' || s!!(d-1) == '#' || s!!(a-1) == '#' || s!!(b-1) == '#' then False
        else if c < d then not (contains (drop (a - 1) $ take c s) && contains (drop (b - 1) $ take d s))
                      else not (contains (drop (a - 1) $ take c s)) && contains3 (drop (b - 2) $ take (d + 1) s)
