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