#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define ABS(a) ((a) < 0 ? (-(a)) : (a))
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)

typedef long long Int;

int main() {
    Int n, a, b, c, d;
    scanf("%lld %lld %lld %lld %lld ", &n, &a, &b, &c, &d);
    bool *x = (bool *)malloc(sizeof(bool) * (n + 2));
    bool prev = false;
    Int current = 0;
    Int max = 0;
    reps(i, n) {
        x[i] = (getchar() == '.');
        if (!(i >= a && i <= MAX(c, d)) && !prev && !x[i]) {
            puts("No");
            return 0;
        }
        if (i >= a && i <= MIN(c, d)) {
            if (x[i]) {
                current++;
                max = MAX(max, current);
            } else {
                current = 0;
            }
        }
        prev = x[i];
    }
    puts(c < d || max >= 3 ? "Yes" : "No");
}

