def no():
    print("No")
    exit()

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

n, a, b, c, d = map(int, input().split())
s = list(input())
for i in range(a - 1, c - 1):
    if s[i] == s[i + 1] == "#":
        no()
for i in range(b - 1, d - 1):
    if s[i] == s[i + 1] == "#":
        no()
if c > d:
    t = 0
    for i in range(b - 2, d - 1):
        if s[i] == s[i + 1] == s[i + 2] == ".":
            t = 1
    if t == 0:
        no()
print("Yes")