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