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

"""
基本的にはシャープが2連続するとだめ
ただし，片方が間に必ず入っている場合は，...が三連続するところがないとダメ
"""

if A<B and C>D:
    for i in range(B-2,D-1):
        if S[i:i+3] == [".", ".", "."]:
            print("Yes")
            exit()
    print("No")
    exit()
elif A>B and C<D:
    for i in range(A-2,C-1):
        if S[i:i+3] == [".", ".", "."]:
            print("Yes")
            exit()
    print("No")
    exit()
else:
    for i in range(min(A,B)-1, max(C,D)-1):
        if S[i] == S[i+1] == "#":
            print("No")
            exit()
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 = list(input()) S list(input()) list input() input """
基本的にはシャープが2連続するとだめ
ただし，片方が間に必ず入っている場合は，...が三連続するところがないとダメ
""" if A<B and C>D:
    for i in range(B-2,D-1):
        if S[i:i+3] == [".", ".", "."]:
            print("Yes")
            exit()
    print("No")
    exit()
elif A>B and C<D:
    for i in range(A-2,C-1):
        if S[i:i+3] == [".", ".", "."]:
            print("Yes")
            exit()
    print("No")
    exit()
else:
    for i in range(min(A,B)-1, max(C,D)-1):
        if S[i] == S[i+1] == "#":
            print("No")
            exit() A<B and C>D A<B A B C>D C D for i in range(B-2,D-1):
        if S[i:i+3] == [".", ".", "."]:
            print("Yes")
            exit()
     i range(B-2,D-1) range B-2 B 2 D-1 D 1 if S[i:i+3] == [".", ".", "."]:
            print("Yes")
            exit()
     S[i:i+3] == [".", ".", "."] S[i:i+3] S i:i+3 i i+3 i 3 [".", ".", "."] "." "." "." print("Yes") print "Yes" exit() exit print("No") print "No" exit() exit elif A>B and C<D:
    for i in range(A-2,C-1):
        if S[i:i+3] == [".", ".", "."]:
            print("Yes")
            exit()
    print("No")
    exit() A>B and C<D A>B A B C<D C D for i in range(A-2,C-1):
        if S[i:i+3] == [".", ".", "."]:
            print("Yes")
            exit()
     i range(A-2,C-1) range A-2 A 2 C-1 C 1 if S[i:i+3] == [".", ".", "."]:
            print("Yes")
            exit()
     S[i:i+3] == [".", ".", "."] S[i:i+3] S i:i+3 i i+3 i 3 [".", ".", "."] "." "." "." print("Yes") print "Yes" exit() exit print("No") print "No" exit() exit for i in range(min(A,B)-1, max(C,D)-1):
        if S[i] == S[i+1] == "#":
            print("No")
            exit() i range(min(A,B)-1, max(C,D)-1) range min(A,B)-1 min(A,B) min A B 1 max(C,D)-1 max(C,D) max C D 1 if S[i] == S[i+1] == "#":
            print("No")
            exit() S[i] == S[i+1] == "#" S[i] == S[i+1] S[i] S i S[i+1] S i+1 i 1 "#" print("No") print "No" exit() exit print("Yes") print "Yes" D = map(int ,input().split()) map(int ,input().split()) D S = list(input()) list(input()) S C, D = map(int ,input().split()) map(int ,input().split()) C 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 N, A, B, C, D = map(int ,input().split()) map(int ,input().split()) N
N, A, B, C, D = map(int ,input().split())
S = list(input())

"""
基本的にはシャープが2連続するとだめ
ただし，片方が間に必ず入っている場合は，...が三連続するところがないとダメ
"""

if A<B and C>D:
    for i in range(B-2,D-1):
        if S[i:i+3] == [".", ".", "."]:
            print("Yes")
            exit()
    print("No")
    exit()
elif A>B and C<D:
    for i in range(A-2,C-1):
        if S[i:i+3] == [".", ".", "."]:
            print("Yes")
            exit()
    print("No")
    exit()
else:
    for i in range(min(A,B)-1, max(C,D)-1):
        if S[i] == S[i+1] == "#":
            print("No")
            exit()
print("Yes")