import sys
input = sys.stdin.readline
def main():
    _, A, B, C, D = map(int, input().split())
    S = input().rstrip("\r\n")
    ans = "Yes"
    for i in range(A-1,C-1):
        if S[i] == "#" and S[i+1] == "#":
            ans = "No"
            break
    for i in range(B-1,D-1):
        if S[i] == "#" and S[i+1] == "#":
            ans = "No"
            break
    if C < D or ans == "No":
        print(ans)
    else:
        ans = "No"
        for i in range(B-1, D):
            if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
                ans = "Yes"
        print(ans)
if __name__ == "__main__":
    main() import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def main():
    _, A, B, C, D = map(int, input().split())
    S = input().rstrip("\r\n")
    ans = "Yes"
    for i in range(A-1,C-1):
        if S[i] == "#" and S[i+1] == "#":
            ans = "No"
            break
    for i in range(B-1,D-1):
        if S[i] == "#" and S[i+1] == "#":
            ans = "No"
            break
    if C < D or ans == "No":
        print(ans)
    else:
        ans = "No"
        for i in range(B-1, D):
            if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
                ans = "Yes"
        print(ans) main _, A, B, C, D = map(int, input().split()) _ map(int, input().split()) map int input().split() ().split () input split A B C D S = input().rstrip("\r\n") S input().rstrip("\r\n") ().rstrip () input rstrip "\r\n" ans = "Yes" ans "Yes" for i in range(A-1,C-1):
        if S[i] == "#" and S[i+1] == "#":
            ans = "No"
            break
     i range(A-1,C-1) range A-1 A 1 C-1 C 1 if S[i] == "#" and S[i+1] == "#":
            ans = "No"
            break
     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" break for i in range(B-1,D-1):
        if S[i] == "#" and S[i+1] == "#":
            ans = "No"
            break
     i range(B-1,D-1) range B-1 B 1 D-1 D 1 if S[i] == "#" and S[i+1] == "#":
            ans = "No"
            break
     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" break if C < D or ans == "No":
        print(ans)
    else:
        ans = "No"
        for i in range(B-1, D):
            if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
                ans = "Yes"
        print(ans) C < D or ans == "No" C < D C D ans == "No" ans "No" print(ans) print ans ans = "No" ans "No" for i in range(B-1, D):
            if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
                ans = "Yes"
         i range(B-1, D) range B-1 B 1 D if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
                ans = "Yes"
         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 "." ans = "Yes" ans "Yes" print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main input = sys.stdin.readline sys.stdin.readline input def main():
    _, A, B, C, D = map(int, input().split())
    S = input().rstrip("\r\n")
    ans = "Yes"
    for i in range(A-1,C-1):
        if S[i] == "#" and S[i+1] == "#":
            ans = "No"
            break
    for i in range(B-1,D-1):
        if S[i] == "#" and S[i+1] == "#":
            ans = "No"
            break
    if C < D or ans == "No":
        print(ans)
    else:
        ans = "No"
        for i in range(B-1, D):
            if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
                ans = "Yes"
        print(ans) def main():
    _, A, B, C, D = map(int, input().split())
    S = input().rstrip("\r\n")
    ans = "Yes"
    for i in range(A-1,C-1):
        if S[i] == "#" and S[i+1] == "#":
            ans = "No"
            break
    for i in range(B-1,D-1):
        if S[i] == "#" and S[i+1] == "#":
            ans = "No"
            break
    if C < D or ans == "No":
        print(ans)
    else:
        ans = "No"
        for i in range(B-1, D):
            if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
                ans = "Yes"
        print(ans) main
import sys
input = sys.stdin.readline
def main():
    _, A, B, C, D = map(int, input().split())
    S = input().rstrip("\r\n")
    ans = "Yes"
    for i in range(A-1,C-1):
        if S[i] == "#" and S[i+1] == "#":
            ans = "No"
            break
    for i in range(B-1,D-1):
        if S[i] == "#" and S[i+1] == "#":
            ans = "No"
            break
    if C < D or ans == "No":
        print(ans)
    else:
        ans = "No"
        for i in range(B-1, D):
            if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
                ans = "Yes"
        print(ans)
if __name__ == "__main__":
    main()