fun main(arg: Array<String>){
    val (N, A, B, C, D) = readLine()!!.split(" ").map(String::toInt)
    val S = readLine()!!
    val A_last = S.substring(A - 1, listOf(C, D).max()!! - 1)
    val common_S = S.substring(listOf(A, B).max()!! - 2, listOf(C, D).min()!!)

    if(A_last.contains("##")){
        System.err.println("double ##")
        println("No")
    }else{
        if(C < D){
            System.err.println("C < D")
            println("Yes")
        }else{
            System.err.println("S[D - 2]: ${S[D - 2]}, S[D} = ${S[D]}")
            val sideX = S[D - 2] == '#' || if(D < N) '#' == S[D] else false
            if(sideX && !common_S.contains("...")){
                System.err.println("cannot cross")
                println("No")
            }else{
                System.err.println("sideX: ${sideX}")
                println("Yes")
            }
        }
    }

}
