'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("")

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

}

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