#include <bits/stdc++.h>
const int maxn=2e5+7;
int n;
int A,B,C,D;
char s[maxn];
int main(){
	scanf("%d%d%d%d%d%s",&n,&A,&B,&C,&D,s+1);
	for(int i=B;i<D;){
		if(s[i+1]=='.')++i;
		else if(s[i+=2]=='#')
			return puts("No"),0;
	}
	if(D<C){
		bool flag=false;
		for(int i=B;i<=D && !flag;++i)
			flag=(s[i-1]=='.' && s[i]=='.' && s[i+1]=='.');
		if(!flag)return puts("No"),0;
	}
	for(int i=A;i<C;){
		if(s[i+1]=='.')++i;
		else if(s[i+=2]=='#')
			return puts("No"),0;
	}return puts("Yes"),0;
}
