'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] = "."
  let pass = false

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

  if(!pass) {
    for(let l=A; l<C; l++) {
      if(S[l-1] === "#" && S[l] === "#") {
        break
      }
      if(l === C-1) {
        console.log("Yes")
        return
      }
    }
  }
  
  // ふぬけ引き返しパターン
  if(N === C) {
    console.log("No")
    return
  }

  let hunuke = 0
  for(let m=C; m<=N; m++) {
    if(S[m-1] === ".") {
      S[m-1] = "#"
      hunuke = m
      break
    }
    if(m === N) {
      console.log("No")
      return
    }
  }

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

  console.log("No")

}

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