#include<cstdio>
#include<algorithm>
using namespace std;
#define MAXN 200010
int n,A,B,C,D;
char s[MAXN];
bool check(int l,int r)
{
	for(int i=l;i<r;i++)
		if(s[i]=='#'&&s[i+1]=='#')
			return 0;
	return 1;
}
int main()
{
	scanf("%d%d%d%d%d%s",&n,&A,&B,&C,&D,s+1);
	if(!check(A,max(C,D)))
		printf("No\n");
	else if(C<D)
		printf("Yes\n");
	else
	{
		for(int i=B;i<=D;i++)
			if(s[i]!='#'&&s[i-1]!='#'&&s[i+1]!='#')
			{
				printf("Yes\n");
				return 0;
			}
		printf("No\n");
	}
}