#include<bits/stdc++.h>
using namespace std;
const int maxn=2e5+5;
bool ok[maxn],tmp[maxn];
string ss;
int n;
bool check(int left,int end)
{
	memset(ok,0,sizeof(ok));
	ok[left]=true;
	for(int i=left+1;i<=end;i++)
		if((ok[i-1]||ok[i-2])&&ss[i]=='.')
			ok[i]=true;
	return ok[end];
}
void fl()
{
	freopen(".in","r",stdin);
	freopen(".out","w",stdout);
}
int main()
{
	ios::sync_with_stdio(0);
//  fl();
	int a,b,c,d;
	cin>>n>>a>>b>>c>>d;
	cin>>ss;
	ss='#'+ss;
	if(c<d)
	{
		if(!check(b,d))
		{
			cout<<1;
			cout<<"No"<<endl;
			return 0;
		}
		if(!check(a,c))
		{
			cout<<2;
			cout<<"No"<<endl;
			return 0;
		}
		cout<<"Yes"<<endl;
		return 0;
	}
	else
	{
		if(!check(b,d))
		{
			cout<<"No"<<endl;
			return 0;
		}
		for(int i=1;i<=n;i++)
			tmp[i]=ok[i];
		for(int i=b;i<=d;i++)
			if(tmp[i])
			{
				ss[i]='#';
				if(check(a,c))
				{
					ss[i]='.';
					if(check(b,i)&&check(i,d))
					{
						cout<<"Yes"<<endl;
						return 0;
					}
				}
				ss[i]='.';
			}
		cout<<"No"<<endl;
	}
	return 0;
}
