#include<bits/stdc++.h>
using namespace std;
const int N=2e5+10;

int n,a,b,c,d;
char s[N];

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() {
	cin>>n>>a>>b>>c>>d;scanf("%s",s+1);
	if(!check(a,c)||!check(b,d)) puts("No");
	else if(c<d) puts("Yes");
	else {
		bool fl=0;
		for(int i=b-1;i<=d-1;i++) if(s[i]!='#'&&s[i+1]!='#'&&s[i+2]!='#') fl=1;
		puts(fl?"Yes":"No");
	}
	return 0;
}
