#include<bits/stdc++.h>
using namespace std;
signed main()
{
	string s;
	int n,sa,sb,ea,eb,end;
	cin>>n>>sa>>sb>>ea>>eb;
	cin>>s;
	s=s+"aaaa";
	eb--;
	ea--;
	sa--;
	sb--;
	bool check=false;
	for(int i=sa;i<max(ea,eb);i++)
	{
		if(s[i]=='#'&&s[i+1]=='#') {cout<<"No"; return 0;}
	}
	if(eb>ea) cout<<"Yes";
	else if(eb<ea)
	{
		bool check=false;
		for(int i=sb-1;i<=eb-1;i++)
		{
			if(s[i]==s[i+1]&&s[i+2]==s[i+1]&&s[i+1]=='.')
			check=true;
		}	
		if(check==true) cout<<"Yes";
		else cout<<"No";
	}
}