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)

ans="Yes"

if D<C:
  if "..." not in S[B-2:D+1]:
    ans="No"

if "##" in S[A-1:max(C,D)]:
  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 D<C:
  if "..." not in S[B-2:D+1]:
    ans="No" D<C D C if "..." not in S[B-2:D+1]:
    ans="No" "..." not in S[B-2:D+1] "..." S[B-2:D+1] S B-2:D+1 B-2 B 2 D+1 D 1 ans="No" ans "No" if "##" in S[A-1:max(C,D)]:
  ans="No" "##" in S[A-1:max(C,D)] "##" S[A-1:max(C,D)] S A-1:max(C,D) A-1 A 1 max(C,D) max C D ans="No" ans "No" print(ans) print ans sr = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() sr ans="No" "No" ans ir = lambda: int(sr()) lambda: int(sr()) ir C, D = lr() lr() C N, A, B, C, D = lr() lr() N lr = lambda: list(map(int, sr().split())) lambda: list(map(int, sr().split())) lr D = lr() lr() D S = input() input() S ans="No" "No" ans ans="Yes" "Yes" ans A, B, C, D = lr() lr() A B, C, D = lr() lr() B
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)

ans="Yes"

if D<C:
  if "..." not in S[B-2:D+1]:
    ans="No"

if "##" in S[A-1:max(C,D)]:
  ans="No"

print(ans)