'use strict'

function Main(input) {
  const N = Number(input.split("\n")[0].split(" ")[0])
  const A = Number(input.split("\n")[0].split(" ")[1])
  const B = Number(input.split("\n")[0].split(" ")[2])
  const C = Number(input.split("\n")[0].split(" ")[3])
  const D = Number(input.split("\n")[0].split(" ")[4])
  const S = input.split("\n")[1].split("")

  for(let i=B; i<D; i++) {
    if(S[i-1] === "#" && S[i] === "#") {
      console.log("No")
      return
    }
  }

  S[D-1] = "#"
  
  for(let j=A; j<C; j++) {
    if(S[j-1] === "#" && S[j] === "#") {
      break
    }
    if(j === C-1) {
      console.log("Yes")
      return
    }
  }

  S[D-1] = "."

  for(let k=B; k<D-1; k++) {
    if(D - B < 3) {
      console.log("No")
      return
    }
    if(S[k-1] === "." && S[k] === "." && S[k+1] === ".") {
      S[k] = "#"
      break
    }
    if(k === D-2) {
      console.log("No")
      return
    }
  }

  for(let l=A; l<C; l++) {
    if(S[l-1] === "#" && S[l] === "#") {
      console.log("No")
      return
    }
    if(l === C-1) {
      console.log("Yes")
      return
    }
  }

}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim())