import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Text.Read as T
import Data.Bool (bool)

main :: IO ()
main = do
  (_ : a : b : c : d : _) <- map unsafeSignedDecimal . T.words <$> T.getLine :: IO [Int]
  s <- T.getLine :: IO T.Text
  putStrLn . bool "No" "Yes" . solve a b c d $ s

solve a b c d s | c < d = check1 b d s && check1 a c s
                | otherwise = check1 b d s && check2 b d s && check1 a c s

check1 :: Int -> Int -> T.Text -> Bool
check1 a c s = fst . foldl step (True, False) . map T.length . T.group . T.take (c - (pred a)) . T.drop (pred a) $ s
  where
    step (True, False) _ = (True, True)
    step (True, True) l = (l <= 1, False)
    step p _ = p

check2 :: Int -> Int -> T.Text -> Bool
check2 b d s = fst . uncurry (foldl step . (,) False) . ((,) <$> (<= 1) . head <*> id) . map T.length . T.group . T.take (d - b + 3) . T.drop (pred $ pred b) $ s
  where
    step (False, True) _ = (False, False)
    step (False, False) l = (3 <= l, True)
    step p _ = p

unsafeSignedDecimal :: T.Text -> Int
unsafeSignedDecimal s = case T.signed T.decimal s of
  Right (n, _) -> n
