#include <iostream>

using namespace std;

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

int main() {
	cin >> n >> a >> b >> c >> d;
	string s;
	cin >> s;
	s = "#"+s;
	bool ok = true;
	for (int i = a+1; i <= c-1; i++) {
		if (s[i] == '#' && s[i+1] == '#') ok = false;
	}
	for (int i = b+1; i <= d-1; i++) {
		if (s[i] == '#' && s[i+1] == '#') ok = false;
	}
	if (c > d && ok) {
		ok = false;
		for (int i = b; i <= d; i++) {
			if (s[i-1] == '.' && s[i] == '.' && s[i+1] == '.') {
				ok = true;
			}
		}
	}
	if (ok) cout << "Yes\n";
	else cout << "No\n";
}
