N, A, B, C, D = map(int, input().split())
S = input()

for i in range(A, C-1):
    if S[i] == "#" and S[i+1] == "#":
        print("No")
        exit()
for i in range(B, D-1):
    if S[i] == "#" and S[i+1] == "#":
        print("No")
        exit()

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

for i in range(A, C-1):
    if S[i] == "#" and S[i+1] == "#":
        print("No")
        exit()
for i in range(B, D-1):
    if S[i] == "#" and S[i+1] == "#":
        print("No")
        exit()

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