import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, A, B, C, D = lr()
S = input()
# if C > D:
#     if "..." not in S[B-1:D]:
#         print("No")
#         exit(0)
# if "##" in S[A-1:C] or "##" in S[B-1:D]:
#     print("No")
# else:
#     print("Yes")

ans = "Yes"
if C > D:
    tmp = S[B-2:D+1].count("...")
    if tmp == 0:
        ans = "No"

tmp = S[A-1:max(C, D)].count("##")
if tmp > 0:
    ans = "No"
print(ans) import sys sys sr = lambda: sys.stdin.readline().rstrip() sr lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip ir = lambda: int(sr()) ir lambda: int(sr()) int(sr()) int sr() sr lr = lambda: list(map(int, sr().split())) lr lambda: list(map(int, sr().split())) list(map(int, sr().split())) list map(int, sr().split()) map int sr().split() ().split () sr split N, A, B, C, D = lr() N lr() lr A B C D S = input() S input() input ans = "Yes" ans "Yes" if C > D:
    tmp = S[B-2:D+1].count("...")
    if tmp == 0:
        ans = "No" C > D C D tmp = S[B-2:D+1].count("...") tmp S[B-2:D+1].count("...") [B-2:D+1].count [B-2:D+1] S B-2:D+1 B-2 B 2 D+1 D 1 count "..." if tmp == 0:
        ans = "No" tmp == 0 tmp 0 ans = "No" ans "No" tmp = S[A-1:max(C, D)].count("##") tmp S[A-1:max(C, D)].count("##") [A-1:max(C, D)].count [A-1:max(C, D)] S A-1:max(C, D) A-1 A 1 max(C, D) max C D count "##" if tmp > 0:
    ans = "No" tmp > 0 tmp 0 ans = "No" ans "No" print(ans) print ans C, D = lr() lr() C B, C, D = lr() lr() B ir = lambda: int(sr()) lambda: int(sr()) ir N, A, B, C, D = lr() lr() N sr = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() sr ans = "No" "No" ans S = input() input() S tmp = S[B-2:D+1].count("...") S[B-2:D+1].count("...") tmp A, B, C, D = lr() lr() A tmp = S[A-1:max(C, D)].count("##") S[A-1:max(C, D)].count("##") tmp D = lr() lr() D lr = lambda: list(map(int, sr().split())) lambda: list(map(int, sr().split())) lr ans = "Yes" "Yes" ans ans = "No" "No" ans
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, A, B, C, D = lr()
S = input()
# if C > D:
#     if "..." not in S[B-1:D]:
#         print("No")
#         exit(0)
# if "##" in S[A-1:C] or "##" in S[B-1:D]:
#     print("No")
# else:
#     print("Yes")

ans = "Yes"
if C > D:
    tmp = S[B-2:D+1].count("...")
    if tmp == 0:
        ans = "No"

tmp = S[A-1:max(C, D)].count("##")
if tmp > 0:
    ans = "No"
print(ans)
