import sys
n, a, b, c, d = map(int, input().split())
s = input()
if any(s[i]==s[i+1]=="#" for i in range(a-1, c-2)) or any(s[i]==s[i+1]=="#" for i in range(b-1, d-2)):
    print("No")
elif c<d:
    print("Yes")
else:
    for i in range(b-1, d):
        if s[i-1]==s[i]==s[i+1]==".":
            print("Yes")
            sys.exit()
    print("No") import sys sys 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 if any(s[i]==s[i+1]=="#" for i in range(a-1, c-2)) or any(s[i]==s[i+1]=="#" for i in range(b-1, d-2)):
    print("No")
elif c<d:
    print("Yes")
else:
    for i in range(b-1, d):
        if s[i-1]==s[i]==s[i+1]==".":
            print("Yes")
            sys.exit()
    print("No") any(s[i]==s[i+1]=="#" for i in range(a-1, c-2)) or any(s[i]==s[i+1]=="#" for i in range(b-1, d-2)) any(s[i]==s[i+1]=="#" for i in range(a-1, c-2)) any s[i]==s[i+1]=="#" s[i]==s[i+1] s[i] s i s[i+1] s i+1 i 1 "#" any(s[i]==s[i+1]=="#" for i in range(b-1, d-2)) any s[i]==s[i+1]=="#" s[i]==s[i+1] s[i] s i s[i+1] s i+1 i 1 "#" print("No") print "No" elif c<d:
    print("Yes") c<d c d print("Yes") print "Yes" for i in range(b-1, d):
        if s[i-1]==s[i]==s[i+1]==".":
            print("Yes")
            sys.exit()
     i range(b-1, d) range b-1 b 1 d if s[i-1]==s[i]==s[i+1]==".":
            print("Yes")
            sys.exit()
     s[i-1]==s[i]==s[i+1]=="." s[i-1]==s[i]==s[i+1] s[i-1]==s[i] s[i-1] s i-1 i 1 s[i] s i s[i+1] s i+1 i 1 "." print("Yes") print "Yes" sys.exit() sys.exit sys exit print("No") print "No" s = input() input() s d = map(int, input().split()) map(int, input().split()) d b, c, d = map(int, input().split()) map(int, input().split()) b c, d = map(int, input().split()) map(int, input().split()) c n, a, b, c, d = map(int, input().split()) map(int, input().split()) n a, b, c, d = map(int, input().split()) map(int, input().split()) a
import sys
n, a, b, c, d = map(int, input().split())
s = input()
if any(s[i]==s[i+1]=="#" for i in range(a-1, c-2)) or any(s[i]==s[i+1]=="#" for i in range(b-1, d-2)):
    print("No")
elif c<d:
    print("Yes")
else:
    for i in range(b-1, d):
        if s[i-1]==s[i]==s[i+1]==".":
            print("Yes")
            sys.exit()
    print("No")
