import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void scan(T...)(ref T a) {
    string[] ss = readln.split;
    foreach (i, t; T) a[i] = ss[i].to!t;
}
T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

bool canReach(string s, int fm, int to) {
    assert(s[fm] == '.' && s[to] == '.');
    int p = fm;
    while (p < to) {
        if (p + 2 <= to && s[p + 2] == '.') p += 2;
        else if (s[p + 1] == '.') p++;
        else return false;
    }
    return true;
}

bool canJumpOver(string s, int lo, int hi) {
    int n = cast(int)s.length;
    for (int i = lo; i <= hi; i++) {
        if (i + 2 >= n) break;
        if (s[i..i+3] == "...") return true;
    }
    return false;
}

bool calc(string s, int a, int b, int c, int d) {
    int n = cast(int)s.length;
    bool reachOk = canReach(s, a, c) && canReach(s, b, d);
    // a, b の移動は独立している
    if (c < d) return reachOk;
    // a は b を追い越す必要がある
    return reachOk && canJumpOver(s, b-1, d-1);
}

void main() {
    int n, a, b, c, d; scan(n, a, b, c, d);
    string s = read!string;
    writeln(calc(s, a-1, b-1, c-1, d-1) ? "Yes" : "No");
}
