import Data.List

solve :: Int -> Int -> Int -> Int -> String -> Bool
solve a b c d s
  | c < d     = chk1 (part a c s) && chk1 (part b d s) 
  | otherwise =  chk1 (part a c s) && chk1 (part b d s)
              && chk2 (part b d s)
  where
    part p q = take (q-p+1) . drop (p-1)
    s' x = map (\t -> if fst t == x then '#' else snd t) $ zip [1..] s
    chk1 s = not . any (\t -> fst t == '#' && snd t == '#') $ zip s (tail s)
    chk2 [] = False
    chk2 [_] = False
    chk2 [_,_] = False
    chk2 (x1:x2:x3:xs) = all (=='.') [x1,x2,x3] || chk2 (x2:x3:xs)

main :: IO ()
main = do
    [n,a,b,c,d] <- map read . words <$> getLine :: IO [Int]
    s <- getLine :: IO String
    putStrLn $ if solve a b c d s then "Yes" else "No"