import java.io._
import java.util.StringTokenizer
import scala.util.control.Breaks.{breakable,break}

object Main extends App {
  val in = new InputReader(System.in)
  val pw = new PrintWriter(System.out)

  // val a = new Array[Int](N)

  val N, A, B, C, D = in.next().toInt
  val s = "#" + in.next()
  val can = '.'


  var ans = true

  if (C == D)
    ans = false
  else if (C < D) {
    for (i <- A to C-1) {
      if (s(i) == '#' && s(i+1) == '#') {
        ans = false
      }
    }
    for (i <- B to D-1) {
      if (s(i) == '#' && s(i+1) == '#') {
        ans = false
      }
    }
  }
  else if (C > D) {
    ans = false

    breakable {
      for(i <- B-1 to D-1) {
        if (i+2 <= N) {
          if (List(s(i), s(i+1), s(i+2)).forall(_ == can))
            ans = true
        }
      }
    }


    for (i <- A to C-1) {
      if (s(i) == '#' && s(i+1) == '#') {
        ans = false
      }
    }
  }


  if (ans)
    println("Yes")
  else
    println("No")
}



class InputReader(stream: InputStream) {
  private val reader = new BufferedReader(new InputStreamReader(stream))
  private var tokenizer: StringTokenizer = new StringTokenizer(reader.readLine())
  def next(): String = {
    while (!tokenizer.hasMoreTokens()) {
      tokenizer = new StringTokenizer(reader.readLine())
    }
    tokenizer.nextToken()
  }
}
