fun main(args: Array<String>) {
    val (n, a, b, c, d) = readIntList()
    val s = readString()

    if (c < d) {
        for (i in a - 1..d - 1) {
            if (i + 1 < n && s[i] == '#' && s[i + 1] == '#') {
                println("No")
                return
            }
        }
        println("Yes")
        return
    } else {

        for (i in a - 1..c - 1) {
            if (i + 1 < n && s[i] == '#' && s[i + 1] == '#') {
                println("No")
                return
            }
        }

        var ok = false
        for (i in b - 1..d - 1) {
            if (i + 1 < n && s[i - 1] == '.' && s[i] == '.' && s[i + 1] == '.') {
                ok = true
            }
        }
        if (ok) {
            println("Yes")
        } else {
            println("No")
        }
        return
    }
}

// read
fun readString() = readLine()!!
fun readInt() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()
fun readStringList() = readLine()!!.split(" ")
fun readIntList() = readLine()!!.split(" ").map(String::toInt)
fun readLongList() = readLine()!!.split(" ").map(String::toLong)
