Problem:
Score : 400 points

Problem Statement

There are N squares arranged in a row, numbered 1, 2, ..., N from left to right.
You are given a string S of length N consisting of . and #. If the i-th character of S is #, Square i contains a rock; if the i-th character of S is ., Square i is empty.

In the beginning, Snuke stands on Square A, and Fnuke stands on Square B.

You can repeat the following operation any number of times:

Choose Snuke or Fnuke, and make him jump one or two squares to the right. The destination must be one of the squares, and it must not contain a rock or the other person.

You want to repeat this operation so that Snuke will stand on Square C and Fnuke will stand on Square D.

Determine whether this is possible.

Constraints

4 \leq N \leq 200\ 000

S is a string of length N consisting of . and #.

1 \leq A, B, C, D \leq N

Square A, B, C and D do not contain a rock.

A, B, C and D are all different.

A < B

A < C

B < D

Input

Input is given from Standard Input in the following format:

N A B C D
S

Output

Print Yes if the objective is achievable, and No if it is not.

Sample Input 1

7 1 3 6 7
.#..#..

Sample Output 1

Yes

The objective is achievable by, for example, moving the two persons as follows. (A and B represent Snuke and Fnuke, respectively.)

A#B.#..

A#.B#..

.#AB#..

.#A.#B.

.#.A#B.

.#.A#.B

.#..#AB

Sample Input 2

7 1 3 7 6
.#..#..

Sample Output 2

No

Sample Input 3

15 1 3 15 13
...#.#...#.#...

Sample Output 3

Yes

Solution in C++14 (GCC 5.4.1) (judge verdict: Wrong Answer)

#define MM_USE_COMP_MACRO

#ifdef MM_USE_COMP_MACRO
//DO NOT READ THIS SECTION:YOU'RE WASTING YOUR TIME
#ifndef MM_USE_COMP_MACRO_DEF
#define MM_USE_COMP_MACRO_DEF

#define _USE_MATH_DEFINES
#include <cstdio>
#include <utility>
#include <cmath>
#include <string>
#include <iostream>

typedef long long signed int ll;

template<class T>
using abp2 = std::pair<T, T>;
template<class T>
using abp3 =  std::pair<std::pair<T,T>, T>;
template<class T>
using abp4 = std::pair<std::pair<T, T>, std::pair<T, T>>;

typedef abp2<ll> ln2;
typedef abp3<ll> ln3;
typedef abp4<ll> ln4;

#define mlp2_t(i,j) std::pair<i,j>
#define mlp3_t(i,j,k) std::pair<std::pair<i,j>,k>
#define mlp4_t(i,j,k,l) std::pair<std::pair<i,j>,std::pair<k,l>>
#define mkp2(i,j) make_pair(i,j)
#define mkp3(i,j,k) make_pair(make_pair(i,j),k)
#define mkp4(i,j,k,l) make_pair(make_pair(i,j),make_pair(k,l))
#define gtp2_1(a) a.first
#define gtp2_2(a) a.second
#define gtp3_1(a) a.first.fisrt
#define gtp3_2(a) a.first.second
#define gtp3_3(a) a.second
#define gtp4_1(a) a.first.fisrt
#define gtp4_2(a) a.first.second
#define gtp4_3(a) a.second.first
#define gtp4_4(a) a.second.second

#define vect_d(a) printf("Dump: In \"%s\" at line %d.\n",__FILE__,__LINE__);for(auto& e:a)std::cout<<e<<" ";std::cout<<std::endl;

#define loop3(i,j,k) for(ll i = j;i < k;i++)
#define loop2(i,j) for(ll i = 0;i < j;i++)
#define loop(j) for(ll i = 0;i < j;i++)


template<class T>
constexpr T mpi = (T)M_PI;
constexpr auto pi_i = mpi<int>;
constexpr auto pi_ll = mpi<ll>;

#ifndef N_MOD
#pragma message( "Warning!! No N_MOD macro is defined. Falling back to 1000000007." )
#define N_MOD 1000000007
#endif

#ifdef _DEBUG
#define assert_error {printf("Error: In \"%s\" at line %d.\n",__FILE__,__LINE__);throw;}
#else
#define assert_error {throw;}
#endif

#endif
#endif

#include <string>
#include <iostream>
#include <vector>
#include <list>
#include <utility>
#include <algorithm>
#include <map>
#include <set>

using namespace std;

int main() {
	ll n, a, b, c, d;
	string s;
	cin >> n >> a >> b >> c >> d >> s;
	a--;
	b--;
	c--;
	d--;

	for (ll i = a + 1; i < c; i++) {
		if (s[i] == '#' && s[i + 1] == '#') goto res_no;
	}
	for (ll i = b + 1; i < d; i++) {
		if (s[i] == '#' && s[i + 1] == '#') goto res_no;
	}

	if (c < d) goto res_yes;

	for (ll i = b; i < d-1; i++) {
		if (s[i] == '.' && s[i + 1] == '.') goto res_yes;
	}

res_no:
	cout << "No" << endl;
	return 0;
res_yes:
	cout << "Yes" << endl;
	return 0;
}