import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.string;

immutable long MOD = 10^^9 + 7;
immutable long INF = 1L << 59;

void main() {
    auto s = readln.split.map!(to!int);
    auto N = s[0];
    auto A = s[1] - 1;
    auto B = s[2] - 1;
    auto C = s[3] - 1;
    auto D = s[4] - 1;
    auto S = readln.chomp;
    bool ok1 = !S[A..min(N, C+1)].canFind("##");
    bool ok2 = !S[B..min(N, D+1)].canFind("##");

    if (C < D) {
        writeln(ok1 && ok2 ? "Yes" : "No");
    } else {
        long flip = S[B-1..min(N, D+2)].indexOf("...");
        if (flip == -1) {
            writeln("No");
            return;
        }
        writeln(ok1 && ok2 ? "Yes" : "No");
    }
}