main = do
  [n, a, b, c, d] <- map read . words <$> getLine
  s <- getLine
  let sraw = drop (a-1) $ take (max c d) s
  if doublehash sraw then putStrLn "No"
    else if c > d && (tripledot sraw == False) then putStrLn "No"
      else putStrLn "Yes"
  
doublehash (x:y:xs)
  | x == '#' && y == '#' = True
  | otherwise = doublehash xs
doublehash _ = False

tripledot (x:y:z:xs)
  | x == '.' && y == '.' && z == '.' = True
  | otherwise = tripledot xs
tripledot _ = False
