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



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

elif c == d:
    print("No")

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

elif c == d:
    print("No")

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



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

elif c == d:
    print("No")

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