#include <bits/stdc++.h>
using namespace std;

void no() {
	cout << "No\n"; exit(0);
}

void yes() {
	cout << "Yes\n"; exit(0);
}


int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);

	int n, a, b, c, d;
	string s;

	cin >> n >> a >> b >> c >> d;
	cin >> s;
	s = ' ' + s;

	for (int i = b; i < d; ++i) {
		if (s[i] == '#' && s[i+1] == '#') no();
	}
	for (int i = a; i < c; ++i) {
		if (s[i] == '#' && s[i+1] == '#') no();
	}

	if (c < d) {
		yes();
	}

	for (int i = b; i <= d; ++i) {
		if (s[i-1] == '.' && s[i] == '.' && s[i+1] == '.') yes();
	}

	no();
}