import scala.io.StdIn

object Main extends App {
  val Array(n, a, b, c, d) = StdIn.readLine().split(" ").map(_.toInt)
  val S  = StdIn.readLine()

  def solve(s : String, a: Int, b: Int, c: Int, d: Int ): String = {
    val s1 = s.slice(a, c)
    val s2 = s.slice(b, d)

    if (s1.contains("##")) 
      return "No"

    if (s2.contains("##")) 
      return "No"

    if (s(c -1) == '#' || s(d -1) == '#')
      return "No"

    if (s.length() == 4)
      return "Yes"

    if (d < c) {
      if (s(b) == '.') {
        if (a + 1 == b || s(b - 2) == '.') {
          return "Yes"
        }
      }
      if (! s1.contains("...")) 
        return "No"
    }

    "No"
  }

  println(solve(S, a, b, c, d))
}
  

