#define _USE_MATH_DEFINES
#include <iostream>
#include <algorithm>
#include <queue>
#include <stack>
#include <deque>
#include <climits>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
//#include <tuple>

#define break break
#define continue continue
#define Yes "Yes"
#define No "No"
#define INF INT_MAX>>1 
#define SIZE 100010
#define MOD 1000000007
#define rep(i, n) for(int i=0; i<(int)(n); i++)
#define rep2(i, from, to) for(int i=(from); i<(int)(to); i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define LLPair pair<ll, ll>
#define vint vector<int>
#define vll vector<ll>
typedef long long ll;

using namespace std;


int main(void){
	int n, sa, sb, ga, gb; cin >> n >> sa >> sb >> ga >> gb;
	string str; cin >> str;
	int count = 0;
	rep2(i, sa, ga){
		if(str[i] == '#') count++;
		else count = 0;
		if(count >= 2){
			cout << "No" << endl;
			return 0;
		}
	}
	rep2(i, sb, gb){
		if(str[i] == '#') count++;
		else count = 0;
		if(count >= 2){
			cout << "No" << endl;
			return 0;
		}
	}

	if((sa < sb && ga < gb) || (sa > sb && ga > gb)){
		cout << Yes << endl;
	} else{
		int count = 0;
		rep2(i, max(sa, sb)-1, min(ga, gb)+1){
			if(str[i] == '.') count++;
			else count = 0;
			if(count >= 3){
				cout << Yes << endl;
				return 0;
			}
		}
		cout << No << endl;
	}
	return 0;
}