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

A -= 1
B -= 1
C -= 1
D -= 1

ok = []
ng = []

for i in range(1, N - 1):
    if S[i] == S[i + 1] and S[i] == "#":
        ng.append(i)
    elif S[i - 1] == S[i] and S[i] == S[i + 1] and S[i] == ".":
        ok.append(i)

for ngi in ng:
    if (A < ngi and ngi < C) or (B < ngi and ngi < D):
        print("No")
        exit()

if C < D:
    print("Yes")

else:
    for oki in ok:
        if B <= oki and oki <= D:
            print("Yes")
            exit()

    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= input() S input() input A -= 1 A 1 B -= 1 B 1 C -= 1 C 1 D -= 1 D 1 ok = [] ok [] ng = [] ng [] for i in range(1, N - 1):
    if S[i] == S[i + 1] and S[i] == "#":
        ng.append(i)
    elif S[i - 1] == S[i] and S[i] == S[i + 1] and S[i] == ".":
        ok.append(i) i range(1, N - 1) range 1 N - 1 N 1 if S[i] == S[i + 1] and S[i] == "#":
        ng.append(i)
    elif S[i - 1] == S[i] and S[i] == S[i + 1] and S[i] == ".":
        ok.append(i) S[i] == S[i + 1] and S[i] == "#" S[i] == S[i + 1] S[i] S i S[i + 1] S i + 1 i 1 S[i] == "#" S[i] S i "#" ng.append(i) ng.append ng append i elif S[i - 1] == S[i] and S[i] == S[i + 1] and S[i] == ".":
        ok.append(i) S[i - 1] == S[i] and S[i] == S[i + 1] and S[i] == "." S[i - 1] == S[i] and S[i] == S[i + 1] S[i - 1] == S[i] S[i - 1] S i - 1 i 1 S[i] S i S[i] == S[i + 1] S[i] S i S[i + 1] S i + 1 i 1 S[i] == "." S[i] S i "." ok.append(i) ok.append ok append i for ngi in ng:
    if (A < ngi and ngi < C) or (B < ngi and ngi < D):
        print("No")
        exit() ngi ng if (A < ngi and ngi < C) or (B < ngi and ngi < D):
        print("No")
        exit() (A < ngi and ngi < C) or (B < ngi and ngi < D) A < ngi and ngi < C A < ngi A ngi ngi < C ngi C B < ngi and ngi < D B < ngi B ngi ngi < D ngi D print("No") print "No" exit() exit if C < D:
    print("Yes")

else:
    for oki in ok:
        if B <= oki and oki <= D:
            print("Yes")
            exit()

    print("No") C < D C D print("Yes") print "Yes" for oki in ok:
        if B <= oki and oki <= D:
            print("Yes")
            exit()

     oki ok if B <= oki and oki <= D:
            print("Yes")
            exit()

     B <= oki and oki <= D B <= oki B oki oki <= D oki D print("Yes") print "Yes" exit() exit print("No") print "No" D -= 1 1 D B, C, D = map(int, input().split()) map(int, input().split()) B A, B, C, D = map(int, input().split()) map(int, input().split()) A C -= 1 1 C C, D = map(int, input().split()) map(int, input().split()) C D = map(int, input().split()) map(int, input().split()) D B -= 1 1 B ok = [] [] ok S= input() input() S N, A, B, C, D = map(int, input().split()) map(int, input().split()) N A -= 1 1 A ng = [] [] ng
N, A, B, C, D = map(int, input().split())
S= input()

A -= 1
B -= 1
C -= 1
D -= 1

ok = []
ng = []

for i in range(1, N - 1):
    if S[i] == S[i + 1] and S[i] == "#":
        ng.append(i)
    elif S[i - 1] == S[i] and S[i] == S[i + 1] and S[i] == ".":
        ok.append(i)

for ngi in ng:
    if (A < ngi and ngi < C) or (B < ngi and ngi < D):
        print("No")
        exit()

if C < D:
    print("Yes")

else:
    for oki in ok:
        if B <= oki and oki <= D:
            print("Yes")
            exit()

    print("No")
