let () =
    let main () =
        let n, a, b, c, d = Scanf.sscanf (read_line ()) "%d %d %d %d %d" (fun n a b c d -> n, a, b, c, d) in
        let s = read_line () in
        let reachable a b =
            let rec loop i prev =
                if i = b then true else
                    if s.[i - 1] = '.' then loop (i + 1) false else
                        if prev then false else loop (i + 1) true
            in
            loop a false
        in
        let three_space a b c d =
            let rec loop i =
                if i + 2 > c then 0 else
                    if s.[i - 1] = '.' && s.[i] = '.' && s.[i + 1] = '.' then i else
                        loop (i + 1)
            in
            let r = loop (b - 1) in
            if r = 0 || r + 1 > d then false else
                reachable b (r + 1) && reachable (r + 1) d &&
                reachable a r && reachable (r + 2) c
        in
        let flag =
            if c < d then reachable a c && reachable b d else
                three_space a b c d
        in
        Printf.printf "%s\n" (if flag then "Yes" else "No")
    in
    main ()