import java.util.*

fun main(args: Array<String>) {
  val sc = Scanner(System.`in`)
  val n = sc.nextInt()
  val a = sc.nextInt()
  val b = sc.nextInt()
  val c = sc.nextInt()
  val d = sc.nextInt()
  val s = sc.next()

  val ss = "#" + s + "#"

  if (hasTwo(ss, a-1, c) || hasTwo(ss, b-1, d)) {
    println("No")
    return
  }

  if (c > d) {
    var ok = false
    for (i in b..d) {
      if (ss[i-1] == '.' && ss[i] == '.' && ss[i+1] == '.') {
        ok = true
      }
    }
    if (!ok) {
      println("No")
      return
    }
  }

  println("Yes")

}

private fun hasTwo(s: String, start: Int, end: Int): Boolean {
  for (i in start..end) {
    if (s[i] == '#' && s[i+1] == '#') return true
  }

  return false
}