#include <bits/stdc++.h>

using namespace std;

int main(){
	int n,a,b,c,d; cin >> n >> a >> b >> c >> d;
	a--;b--;c--;d--;
	string s; cin >> s;
	for(int i=a+1;i<c;i++){
		if(s[i]=='#' && s[i+1]=='#'){
			cout << "No" << endl;
			return 0;
		}
	}
	for(int i=b+1;i<d;i++){
		if(s[i]=='#' && s[i+1]=='#'){
			cout << "No" << endl;
			return 0;
		}
	}
	if(c<d)
		cout << "Yes" << endl;
	else{
		for(int i=b;i<=d;i++){
			if(s[i]=='.' && s[i-1]=='.' && s[i+1]=='.'){
				cout << "Yes" << endl;
				return 0;
			}
		}
		cout << "No" << endl;
	}
	return 0;
}