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

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

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