(* O(n) *)
Scanf.scanf " %d %d %d %d %d" @@ fun n a b c d ->
  let a, b, c, d = a - 1, b - 1, c - 1, d - 1 in
  let s = Scanf.scanf " %s" @@ fun s -> s in
  let l, l_end, r, r_end = if a < b then a, c, b, d else b, d, a, c in
  (try
    let i = Str.search_forward (Str.regexp "##") s l in
    if i <= max l_end r_end then (print_endline "No"; exit 0) with
  | _ -> ());
  print_endline @@
    if l_end > r_end then
      try
        let i = Str.search_forward (Str.regexp "\\.\\.\\.") s @@ r - 1 in
        if i <= r_end - 1 then "Yes" else "No" with
      | _ -> "No"
    else "Yes"