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 isReachable(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 findJumpPoint(string s, int fm, int to) {
    int n = cast(int)s.length;
    for (int i = fm; i <= to; 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 = isReachable(s, a, c) && isReachable(s, b, d);
    // a, b の移動は独立している
    if (c < d) return reachOk;
    // a は b を追い越す必要がある
    return reachOk && findJumpPoint(s, a, c-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");
}
