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