object Main extends App {
  val in = scala.io.Source.stdin.getLines.toSeq
  val ls = in.head.split(' ').map(_.toInt)
  val S = in.tail.head
  val N = ls(0)
  val A = ls(1)
  val B = ls(2)
  val C = ls(3)
  val D = ls(4)
  private def func(s:String, a:Int, b:Int):Boolean = {
    val sub = s.slice(a, b)
    sub.contains("##")
  }
  private def left():Boolean = {
    val sub = S.slice(0, A)
    sub.matches("\\.\\.\\..*##")
  }
  private def mid():Boolean = {
    val sub = S.slice(A, C)
    !sub.contains("...")
  }
  private def right():Boolean = {
    val sub = S.slice(C, S.size)
    sub.matches("##.*\\.\\.\\.")
  }
  if(func(S, A, C) || func(S, B, D)) println("No")
  //else if(D < C && !S.contains("...")) println("No")
  else if(D < C && (left() || mid() || right()) ) println("No")
  else println("Yes")
}
