import sys
input = sys.stdin.readline

def linput(ty=int, cvt=list):
	return cvt(map(ty,input().split()))

def gcd(a: int, b: int):
	while b: a, b = b, a%b
	return a

def lcm(a: int, b: int):
	return a * b // gcd(a, b)

def main():
	n,a,b,c,d = linput()
	S = "_" + input().rstrip()
	
	res = 1
	#if c<d:
	X = S[a:c].count("##")
	X += S[b:d].count("##")
	if X!=0: res=0
	
	if c>d:
		Y = S[b-1:d+2].count("...")
		if Y==0: res=0
	
	sT = "No Yes".split()
	print(sT[res])

if __name__ == "__main__":
	main() import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def linput(ty=int, cvt=list):
	return cvt(map(ty,input().split())) linput return cvt(map(ty,input().split())) cvt(map(ty,input().split())) cvt map(ty,input().split()) map ty input().split() ().split () input split ty=int ty int cvt=list cvt list def gcd(a: int, b: int):
	while b: a, b = b, a%b
	return a gcd while b: a, b = b, a%b
	 b return a a a: int a b: int b def lcm(a: int, b: int):
	return a * b // gcd(a, b) lcm return a * b // gcd(a, b) a * b // gcd(a, b) a * b a b gcd(a, b) gcd a b a: int a b: int b def main():
	n,a,b,c,d = linput()
	S = "_" + input().rstrip()
	
	res = 1
	#if c<d:
	X = S[a:c].count("##")
	X += S[b:d].count("##")
	if X!=0: res=0
	
	if c>d:
		Y = S[b-1:d+2].count("...")
		if Y==0: res=0
	
	sT = "No Yes".split()
	print(sT[res]) main n,a,b,c,d = linput() n linput() linput a b c d S = "_" + input().rstrip() S "_" + input().rstrip() "_" input().rstrip() ().rstrip () input rstrip res = 1 res 1 X = S[a:c].count("##") X S[a:c].count("##") [a:c].count [a:c] S a:c a c count "##" X += S[b:d].count("##") X S[b:d].count("##") [b:d].count [b:d] S b:d b d count "##" if X!=0: res=0
	
	 X!=0 X 0 if c>d:
		Y = S[b-1:d+2].count("...")
		if Y==0: res=0
	
	 c>d c d Y = S[b-1:d+2].count("...") Y S[b-1:d+2].count("...") [b-1:d+2].count [b-1:d+2] S b-1:d+2 b-1 b 1 d+2 d 2 count "..." if Y==0: res=0
	
	 Y==0 Y 0 sT = "No Yes".split() sT "No Yes".split() "No Yes".split "No Yes" split print(sT[res]) print sT[res] sT res if __name__ == "__main__":
	main() __name__ == "__main__" __name__ "__main__" main() main def main():
	n,a,b,c,d = linput()
	S = "_" + input().rstrip()
	
	res = 1
	#if c<d:
	X = S[a:c].count("##")
	X += S[b:d].count("##")
	if X!=0: res=0
	
	if c>d:
		Y = S[b-1:d+2].count("...")
		if Y==0: res=0
	
	sT = "No Yes".split()
	print(sT[res]) def main():
	n,a,b,c,d = linput()
	S = "_" + input().rstrip()
	
	res = 1
	#if c<d:
	X = S[a:c].count("##")
	X += S[b:d].count("##")
	if X!=0: res=0
	
	if c>d:
		Y = S[b-1:d+2].count("...")
		if Y==0: res=0
	
	sT = "No Yes".split()
	print(sT[res]) main def lcm(a: int, b: int):
	return a * b // gcd(a, b) def lcm(a: int, b: int):
	return a * b // gcd(a, b) lcm input = sys.stdin.readline sys.stdin.readline input def linput(ty=int, cvt=list):
	return cvt(map(ty,input().split())) def linput(ty=int, cvt=list):
	return cvt(map(ty,input().split())) linput def gcd(a: int, b: int):
	while b: a, b = b, a%b
	return a def gcd(a: int, b: int):
	while b: a, b = b, a%b
	return a gcd
import sys
input = sys.stdin.readline

def linput(ty=int, cvt=list):
	return cvt(map(ty,input().split()))

def gcd(a: int, b: int):
	while b: a, b = b, a%b
	return a

def lcm(a: int, b: int):
	return a * b // gcd(a, b)

def main():
	n,a,b,c,d = linput()
	S = "_" + input().rstrip()
	
	res = 1
	#if c<d:
	X = S[a:c].count("##")
	X += S[b:d].count("##")
	if X!=0: res=0
	
	if c>d:
		Y = S[b-1:d+2].count("...")
		if Y==0: res=0
	
	sT = "No Yes".split()
	print(sT[res])

if __name__ == "__main__":
	main()
