#include<bits/stdc++.h>

using namespace std;
int main(){
	int n,a,b,c,d;
	cin>>n>>a>>b>>c>>d;
	string s;
	cin>>s;
	s='$'+s;
	int cnt;
	if(c>d){
		cnt=0;
		bool check=0;
		for(int i=b-1;i<=d+1;i++){
			if(s[i]=='.')cnt++;
			else{
				if(cnt>=3){
					check=1;
					break;
				}
				else cnt=0;
			}
		}
		if(cnt>=3)check=1;
		if(check==0){
			cout<<"No";
			return 0;
		}
	}
	for(int i=a;i<c;i++){
		if(s[i]=='#'&&s[i+1]=='#'){
			cout<<"No";
			return 0;
		}
	}
	for(int i=b;i<d;i++){
		if(s[i]=='#'&&s[i+1]=='#'){
			cout<<"No";
			return 0;
		}
	}
	cout<<"Yes";
	return 0;
}