import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
#from decimal import *

N, A, B, C, D = MAP()
S = list(input())

def cango(a, b):
	for i in range(a, b):
		if S[i] == "#" and S[i+1] == "#":
			return False
			break
	else:
		return True

if C < D:
	if cango(A-1, C-1) and cango(B-1, D-1):
		print("Yes")
	else:
		print("No")

else:
	for i in range(B-2, D-1):
		if S[i] == S[i+1] == S[i+2] == ".":
			S[i+1] = "#"
			break
	else:
		print("No")
		exit()

	if cango(A-1, C-1):
		print("Yes")
	else:
		print("No") import sys, re sys re from collections import deque, defaultdict, Counter from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby from operator import itemgetter, mul from copy import deepcopy from string import ascii_lowercase, ascii_uppercase, digits from bisect import bisect, bisect_left, insort, insort_left from fractions import gcd from heapq import heappush, heappop from functools import reduce def input(): return sys.stdin.readline().strip() input def INT(): return int(input()) INT def MAP(): return map(int, input().split()) MAP def LIST(): return list(map(int, input().split())) LIST MAP() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) MAP() MAP def ZIP(n): return zip(*(MAP() for _ in range(n))) ZIP n n sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 INF = float('inf') INF float('inf') float 'inf' mod = 10**9 + 7 mod 10**9 + 7 10**9 10 9 7 N, A, B, C, D = MAP() N MAP() MAP A B C D S = list(input()) S list(input()) list input() input def cango(a, b):
	for i in range(a, b):
		if S[i] == "#" and S[i+1] == "#":
			return False
			break
	else:
		return True cango for i in range(a, b):
		if S[i] == "#" and S[i+1] == "#":
			return False
			break
	else:
		return True i range(a, b) range a b if S[i] == "#" and S[i+1] == "#":
			return False
			break
	 S[i] == "#" and S[i+1] == "#" S[i] == "#" S[i] S i "#" S[i+1] == "#" S[i+1] S i+1 i 1 "#" return False False break return True True a a b b if C < D:
	if cango(A-1, C-1) and cango(B-1, D-1):
		print("Yes")
	else:
		print("No")

else:
	for i in range(B-2, D-1):
		if S[i] == S[i+1] == S[i+2] == ".":
			S[i+1] = "#"
			break
	else:
		print("No")
		exit()

	if cango(A-1, C-1):
		print("Yes")
	else:
		print("No") C < D C D if cango(A-1, C-1) and cango(B-1, D-1):
		print("Yes")
	else:
		print("No") cango(A-1, C-1) and cango(B-1, D-1) cango(A-1, C-1) cango A-1 A 1 C-1 C 1 cango(B-1, D-1) cango B-1 B 1 D-1 D 1 print("Yes") print "Yes" print("No") print "No" for i in range(B-2, D-1):
		if S[i] == S[i+1] == S[i+2] == ".":
			S[i+1] = "#"
			break
	else:
		print("No")
		exit()

	 i range(B-2, D-1) range B-2 B 2 D-1 D 1 if S[i] == S[i+1] == S[i+2] == ".":
			S[i+1] = "#"
			break
	 S[i] == S[i+1] == S[i+2] == "." S[i] == S[i+1] == S[i+2] S[i] == S[i+1] S[i] S i S[i+1] S i+1 i 1 S[i+2] S i+2 i 2 "." S[i+1] = "#" S[i+1] S i+1 i 1 "#" break print("No") print "No" exit() exit if cango(A-1, C-1):
		print("Yes")
	else:
		print("No") cango(A-1, C-1) cango A-1 A 1 C-1 C 1 print("Yes") print "Yes" print("No") print "No" def MAP(): return map(int, input().split()) def MAP(): return map(int, input().split()) MAP A, B, C, D = MAP() MAP() A def INT(): return int(input()) def INT(): return int(input()) INT INF = float('inf') float('inf') INF def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input S = list(input()) list(input()) S def cango(a, b):
	for i in range(a, b):
		if S[i] == "#" and S[i+1] == "#":
			return False
			break
	else:
		return True def cango(a, b):
	for i in range(a, b):
		if S[i] == "#" and S[i+1] == "#":
			return False
			break
	else:
		return True cango B, C, D = MAP() MAP() B mod = 10**9 + 7 10**9 + 7 mod def LIST(): return list(map(int, input().split())) def LIST(): return list(map(int, input().split())) LIST D = MAP() MAP() D N, A, B, C, D = MAP() MAP() N C, D = MAP() MAP() C def ZIP(n): return zip(*(MAP() for _ in range(n))) def ZIP(n): return zip(*(MAP() for _ in range(n))) ZIP
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
#from decimal import *

N, A, B, C, D = MAP()
S = list(input())

def cango(a, b):
	for i in range(a, b):
		if S[i] == "#" and S[i+1] == "#":
			return False
			break
	else:
		return True

if C < D:
	if cango(A-1, C-1) and cango(B-1, D-1):
		print("Yes")
	else:
		print("No")

else:
	for i in range(B-2, D-1):
		if S[i] == S[i+1] == S[i+2] == ".":
			S[i+1] = "#"
			break
	else:
		print("No")
		exit()

	if cango(A-1, C-1):
		print("Yes")
	else:
		print("No")