n,a,b,c,d = map(int, input().split())
s = input()
a -= 1
b -= 1
c -= 1
d -= 1


if c<d:
    for i in range(b,d):
        if s[i]==s[i+1]=="#":
            print("No")
            exit()
    for i in range(a,c):
        if s[i]==s[i+1]=="#":
            print("No")
            exit()
    print("Yes")
    exit()

flag = False
for i in range(b-1,d):
    if s[i]==s[i+1]==s[i+2]==".":
        flag = True
        break
if not flag:
    print("No")
    exit()

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


if c<d:
    for i in range(b,d):
        if s[i]==s[i+1]=="#":
            print("No")
            exit()
    for i in range(a,c):
        if s[i]==s[i+1]=="#":
            print("No")
            exit()
    print("Yes")
    exit()

flag = False
for i in range(b-1,d):
    if s[i]==s[i+1]==s[i+2]==".":
        flag = True
        break
if not flag:
    print("No")
    exit()

for i in range(b,d):
    if s[i]==s[i+1]=="#":
        print("No")
        exit()
for i in range(a,c):
    if s[i]==s[i+1]=="#":
        print("No")
        exit()
print("Yes")