fun main(args: Array<String>) {
    var (n,a,b,c,d) = readLine()!!.split(" ").map { it.toInt() }
    a-=1
    b-=1
    c-=1
    d-=1
    val s = readLine()!!
    if(s[c]=='.'&&s[d]=='.'){
        for(i in a until c-1){
            if(s[i]=='#'&&s[i+1]=='#'){
                println("No")
                return
            }
        }
        for(i in b until d-1){
            if(s[i]=='#'&&s[i+1]=='#'){
                println("No")
                return
            }
        }
        if(d<c){
            for(i in b-1 until d){
                if(s[i]=='.'&&s[i+1]=='.'&&s[i+2]=='.'){
                    println("Yes")
                    return
                }
            }
            println("No")
            return
        }else{
            println("Yes")
        }
    }

}