n, a, b, c, d = map(int, input().split())
s = list(input())
jud = True

for i in range(min(a, b) - 1, max(c, d) - 1):
    if s[i] == "#":
        if s[i + 1] == "#":
            jud = False
            break

if (a < b and c > d and jud) or (a > b and c < d and jud):
    jud = False
    for i in range(max(a, b) - 2, min(c, d) - 1):
        if s[i] == ".":
            if s[i + 1] == "." and s[i + 2] == ".":
                jud = True

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

for i in range(min(a, b) - 1, max(c, d) - 1):
    if s[i] == "#":
        if s[i + 1] == "#":
            jud = False
            break

if (a < b and c > d and jud) or (a > b and c < d and jud):
    jud = False
    for i in range(max(a, b) - 2, min(c, d) - 1):
        if s[i] == ".":
            if s[i + 1] == "." and s[i + 2] == ".":
                jud = True

if jud:
    print("Yes")
else:
    print(("No"))