//#pragma once
#include <stdio.h>
#include <string>
#include <iostream>
#include <queue>
#include <algorithm>
#include <sstream>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <numeric>

using namespace std;
#define modd 1000000007
#define moda 1000003


typedef pair<long long, long long> pl;



#define ll long long




/*
class UnionFind {
public:
	vector <ll> par; 
	vector <ll> siz;
	vector <ll> gr;

	// Constructor
	UnionFind(ll sz_) : par(sz_), siz(sz_, 1LL) ,gr(sz_){
		for (ll i = 0; i < sz_; ++i) par[i] = i; 
	}
	void init(ll sz_) {
		par.resize(sz_);
		siz.assign(sz_, 1LL);  // resize だとなぜか初期化されなかった
		for (ll i = 0; i < sz_; ++i) par[i] = i; // 初期では親は自分自身
	}

	// Member Function
	// Find
	ll root(ll x) { // 根の検索
		while (par[x] != x) {
			x = par[x] = par[par[x]]; // x の親の親を x の親とする
		}
		return x;
	}

	// Union(Unite, Merge)
	bool merge(ll x, ll y) {
		x = root(x);
		y = root(y);
		if (x == y) return false;

		// merge technique（データ構造をマージするテク．小を大にくっつける）
		if (siz[x] < siz[y]) swap(x, y);
		siz[x] += siz[y];
		par[y] = x;
		return true;
	}



	bool issame(ll x, ll y) { // 連結判定
		return root(x) == root(y);
	}

	ll size(ll x) { // 素集合のサイズ
		return siz[root(x)];
	}


};*/


long long N, M, K, a, b, c, d,e, H, W, Q;
long long A[200005] = {};
long long B[200005] = {};
long long C[200005] = {};
bool f, ff,fff;
string S;
set <long long>sll;
pl bufpl;
vector <long long>vl[100005];
vector <pl>vpl[100005];
vector <string> vs;
set<ll> llset;

struct ST
{
	long long hajime;
	long long owari;
	long long zahyou;
	int bangou;

	bool operator<(const ST& another) const
	{
		return hajime < another.hajime;//年齢を比較
	};

};



vector <ST> vst;
ST st[200005];



int main() {

	cin >> N>>a>>b>>c>>d>>S;
	e = 0;
	f = false;
	if (S[0] == '#') {
		f = true;
	}
	

	for (int i = 0; i< S.size(); i++) {
		if (f == true ) {
			if (S[i] == '.') {
				f = false;
				e++;
				A[e]++;
			}
			else {
				A[e]++;
			}


		}
		else {
			if (S[i] == '#') {
				f = true;
				e++;
				A[e]++;
			}
			else {
				A[e]++;
			}
		}

		if (a-1 == i) {
			B[0] = e;
		}

		if (b-1 == i) {
			B[1] = e;
			B[5] = A[e];

		}

		if (c-1 == i) {
			B[2] = e;
		}

		if (d-1 == i) {
			B[3] = e;
			B[4] = A[e];
		}


	}

	f = false;
	ff = false;
	fff = false;

	if (c < d) {

		ff = true;
		for (int i = B[0]; i < B[2]; i+=2) {
			if (i + 1 <= e) {
				if (A[i + 1]>=2) {
					ff = false;
				}
			}


		}

		for (int i = B[1]; i < B[3]; i += 2) {
			if (i + 1 <= e) {
				if (A[i + 1] >= 2) {
					ff = false;
				}
			}


		}

	}
	else {

		fff = true;
		for (int i = B[0]; i < B[2]; i += 2) {
			if (i + 1 <= e) {
				if (A[i + 1] >= 2) {
					fff = false;
				}
			}


		}

		for (int i = B[1]; i < B[3]; i += 2) {
			if (i + 1 <= e) {
				if (A[i + 1] >= 2) {
					fff = false;
				}
			}


		}


		f = false;

		for (int i = B[1]+2; i < B[3]; i += 2) {
			
			if (A[i] >= 3) {
				f = true;
			}

		}

		if (A[B[1]] >= 3 && B[5] != A[B[1]]) {
			f = true;
		}

		if (A[B[3]] >= 3 && B[4] >= 2) {
			f = true;
		}


		ff = false;
		if (f && fff) {
			ff = true;
		}

	}

	if (ff) {
		cout << "Yes" << endl;
	}
	else{
		cout << "No" << endl;
	}

	return 0;

}


Measured memory_bytes: 9732