N, A, B, C, D = map(int, input().split())
S = ["#"] + list(input())

flag = True
for i in range(A, C):
    if S[i] == "#" and S[i + 1] == "#":
        flag = False
        break
else:
    for i in range(B, D):
        if S[i] == "#" and S[i + 1] == "#":
            flag = False
            break

if flag:
    if C < D:
        print("Yes")
    else:
        for i in range(B, D + 1):
            if S[i - 1] == "." and S[i] == "." and S[i + 1] == ".":
                print("Yes")
                break
        else:
            print("No")
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()) list input() input flag = True flag True for i in range(A, C):
    if S[i] == "#" and S[i + 1] == "#":
        flag = False
        break
else:
    for i in range(B, D):
        if S[i] == "#" and S[i + 1] == "#":
            flag = False
            break i range(A, C) range A C if S[i] == "#" and S[i + 1] == "#":
        flag = False
        break S[i] == "#" and S[i + 1] == "#" S[i] == "#" S[i] S i "#" S[i + 1] == "#" S[i + 1] S i + 1 i 1 "#" flag = False flag False break for i in range(B, D):
        if S[i] == "#" and S[i + 1] == "#":
            flag = False
            break i range(B, D) range B D if S[i] == "#" and S[i + 1] == "#":
            flag = False
            break S[i] == "#" and S[i + 1] == "#" S[i] == "#" S[i] S i "#" S[i + 1] == "#" S[i + 1] S i + 1 i 1 "#" flag = False flag False break if flag:
    if C < D:
        print("Yes")
    else:
        for i in range(B, D + 1):
            if S[i - 1] == "." and S[i] == "." and S[i + 1] == ".":
                print("Yes")
                break
        else:
            print("No")
else:
    print("No") flag if C < D:
        print("Yes")
    else:
        for i in range(B, D + 1):
            if S[i - 1] == "." and S[i] == "." and S[i + 1] == ".":
                print("Yes")
                break
        else:
            print("No") C < D C D print("Yes") print "Yes" for i in range(B, D + 1):
            if S[i - 1] == "." and S[i] == "." and S[i + 1] == ".":
                print("Yes")
                break
        else:
            print("No") i range(B, D + 1) range B D + 1 D 1 if S[i - 1] == "." and S[i] == "." and S[i + 1] == ".":
                print("Yes")
                break
         S[i - 1] == "." and S[i] == "." and S[i + 1] == "." S[i - 1] == "." and S[i] == "." S[i - 1] == "." S[i - 1] S i - 1 i 1 "." S[i] == "." S[i] S i "." S[i + 1] == "." S[i + 1] S i + 1 i 1 "." print("Yes") print "Yes" break print("No") print "No" print("No") print "No" N, A, B, C, D = map(int, input().split()) map(int, input().split()) N D = map(int, input().split()) map(int, input().split()) D S = ["#"] + list(input()) ["#"] + list(input()) S flag = True True flag 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 flag = False False flag flag = False False flag C, D = map(int, input().split()) map(int, input().split()) C
N, A, B, C, D = map(int, input().split())
S = ["#"] + list(input())

flag = True
for i in range(A, C):
    if S[i] == "#" and S[i + 1] == "#":
        flag = False
        break
else:
    for i in range(B, D):
        if S[i] == "#" and S[i + 1] == "#":
            flag = False
            break

if flag:
    if C < D:
        print("Yes")
    else:
        for i in range(B, D + 1):
            if S[i - 1] == "." and S[i] == "." and S[i + 1] == ".":
                print("Yes")
                break
        else:
            print("No")
else:
    print("No")
