#include <cstdio>

const int N = 2e5 + 5;

int n, A, B, C, D;
char s[N];

bool check(int x, int y) {
	for (int i = x + 1; i < y; i++) {
		if (s[i] == '#' && s[i + 1] == '#') return false;
	}
	return true;
}
bool Check(int x, int y) {
	for (int i = x; i <= y; i++) {
		if (s[i] == '.' && s[i - 1] != '#' && s[i + 1] != '#') return true;
	}
	return false;
}
int main() {
	scanf("%d%d%d%d%d%s", &n, &A, &B, &C, &D, s + 1);
	if (C < D) {
		printf("%s\n", check(A, C) && check(B, D) ? "Yes" : "No");
	} else {
		printf("%s\n", check(A, C) && Check(B, D) && check(B, D) ? "Yes" : "No");
	}
	return 0;
}