//Love and Freedom.
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<cstring>
#define ll long long
#define inf 20021225
using namespace std;
char ch[200001]; int a,b,c,d,n;
int main()
{
	scanf("%d%d%d%d%d",&n,&a,&b,&c,&d);
	int f=(d<c); scanf("%s",ch+1);
	for(int i=b-1;i<=d-1;i++)
	{
		if(i+2>n)	continue;
		if(ch[i]=='.'&&ch[i+1]=='.'&&ch[i+2]=='.')
			f=0;
	}
	for(int i=a;i<=max(c,d)-1;i++)
		if(ch[i]=='#'&&ch[i+1]=='#'){f=1;break;}
	if(f==1)	printf("No\n");
	else	printf("Yes\n");
	return 0;
}
