import sys

# A - Kenken Race
def can_goal(start, goal):
	global S

	way = S[start:goal+1]

	if not '##' in way:
		return True


def can_go_halfway(start, goal):
	global S

	way = S[start:goal+1]

	if way.find('...') > -1:
		return True


N, A, B, C, D = map(int, input().split())
S = input()
S = '.' + S

if C < D:
	if can_goal(B, D):
		if can_goal(A, C):
			print('Yes')
			exit()
else:
	if can_go_halfway(B - 1, D + 1):
		if can_goal(A, C):
			if can_goal(B, D):
				print('Yes')
				exit()

print('No') import sys sys def can_goal(start, goal):
	global S

	way = S[start:goal+1]

	if not '##' in way:
		return True can_goal global S way = S[start:goal+1] way S[start:goal+1] S start:goal+1 start goal+1 goal 1 if not '##' in way:
		return True not '##' in way '##' in way '##' way return True True start start goal goal def can_go_halfway(start, goal):
	global S

	way = S[start:goal+1]

	if way.find('...') > -1:
		return True can_go_halfway global S way = S[start:goal+1] way S[start:goal+1] S start:goal+1 start goal+1 goal 1 if way.find('...') > -1:
		return True way.find('...') > -1 way.find('...') way.find way find '...' -1 return True True start start goal goal N, A, B, C, D = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split A B C D S = input() S input() input S = '.' + S S '.' + S '.' S if C < D:
	if can_goal(B, D):
		if can_goal(A, C):
			print('Yes')
			exit()
else:
	if can_go_halfway(B - 1, D + 1):
		if can_goal(A, C):
			if can_goal(B, D):
				print('Yes')
				exit() C < D C D if can_goal(B, D):
		if can_goal(A, C):
			print('Yes')
			exit() can_goal(B, D) can_goal B D if can_goal(A, C):
			print('Yes')
			exit() can_goal(A, C) can_goal A C print('Yes') print 'Yes' exit() exit if can_go_halfway(B - 1, D + 1):
		if can_goal(A, C):
			if can_goal(B, D):
				print('Yes')
				exit() can_go_halfway(B - 1, D + 1) can_go_halfway B - 1 B 1 D + 1 D 1 if can_goal(A, C):
			if can_goal(B, D):
				print('Yes')
				exit() can_goal(A, C) can_goal A C if can_goal(B, D):
				print('Yes')
				exit() can_goal(B, D) can_goal B D print('Yes') print 'Yes' exit() exit print('No') print 'No' D = map(int, input().split()) map(int, input().split()) D S = '.' + S '.' + S S C, D = map(int, input().split()) map(int, input().split()) C def can_go_halfway(start, goal):
	global S

	way = S[start:goal+1]

	if way.find('...') > -1:
		return True def can_go_halfway(start, goal):
	global S

	way = S[start:goal+1]

	if way.find('...') > -1:
		return True can_go_halfway A, B, C, D = map(int, input().split()) map(int, input().split()) A S = input() input() S N, A, B, C, D = map(int, input().split()) map(int, input().split()) N B, C, D = map(int, input().split()) map(int, input().split()) B def can_goal(start, goal):
	global S

	way = S[start:goal+1]

	if not '##' in way:
		return True def can_goal(start, goal):
	global S

	way = S[start:goal+1]

	if not '##' in way:
		return True can_goal
import sys

# A - Kenken Race
def can_goal(start, goal):
	global S

	way = S[start:goal+1]

	if not '##' in way:
		return True


def can_go_halfway(start, goal):
	global S

	way = S[start:goal+1]

	if way.find('...') > -1:
		return True


N, A, B, C, D = map(int, input().split())
S = input()
S = '.' + S

if C < D:
	if can_goal(B, D):
		if can_goal(A, C):
			print('Yes')
			exit()
else:
	if can_go_halfway(B - 1, D + 1):
		if can_goal(A, C):
			if can_goal(B, D):
				print('Yes')
				exit()

print('No')