let n, a, b, c, d, s = Scanf.scanf " %d %d %d %d %d %s" @@ fun a b c d e f -> a, b - 1, c - 1, d - 1, e - 1, f
let s2, s3 = String.sub s a @@ c - a + 1, String.sub s b @@ d - b + 1
let f s = try Str.search_forward (Str.regexp "##") s 0 |> ignore; false with _ -> true
let s4 = String.sub s (b - 1) @@ min (n - b + 1) @@ d - b + 3
let _ = print_endline @@ 
  if f s2 && f s3 then
    if d < c then
      try Str.search_forward (Str.regexp "\\.\\.\\.") s4 0 |> ignore; "Yes" with _ -> "No"
    else "Yes"
  else "No"