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

goal = max(C,D)
if '##' in S[A-1:goal]:
  print("No")
  exit()

ok = True
# 追い越す必要がある
if D < C:
  # 間に3マスあきがない or B,Dの間に3マス空きがない
  if ('...' in S[B-1:D]) or ('...' in S[B-2:B+1]) or ('...' in S[D-2:D+1]):
    ok = True
  else:
    ok = False
# 必要がない場合は問題ない

if ok:
  print("Yes")
else:
  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 goal = max(C,D) goal max(C,D) max C D if '##' in S[A-1:goal]:
  print("No")
  exit() '##' in S[A-1:goal] '##' S[A-1:goal] S A-1:goal A-1 A 1 goal print("No") print "No" exit() exit ok = True ok True if D < C:
  # 間に3マスあきがない or B,Dの間に3マス空きがない
  if ('...' in S[B-1:D]) or ('...' in S[B-2:B+1]) or ('...' in S[D-2:D+1]):
    ok = True
  else:
    ok = False
# 必要がない場合は問題ない D < C D C if ('...' in S[B-1:D]) or ('...' in S[B-2:B+1]) or ('...' in S[D-2:D+1]):
    ok = True
  else:
    ok = False
# 必要がない場合は問題ない ('...' in S[B-1:D]) or ('...' in S[B-2:B+1]) or ('...' in S[D-2:D+1]) ('...' in S[B-1:D]) or ('...' in S[B-2:B+1]) '...' in S[B-1:D] '...' S[B-1:D] S B-1:D B-1 B 1 D '...' in S[B-2:B+1] '...' S[B-2:B+1] S B-2:B+1 B-2 B 2 B+1 B 1 '...' in S[D-2:D+1] '...' S[D-2:D+1] S D-2:D+1 D-2 D 2 D+1 D 1 ok = True ok True ok = False ok False if ok:
  print("Yes")
else:
  print("No") ok print("Yes") print "Yes" print("No") print "No" N,A,B,C,D = map(int,input().split()) map(int,input().split()) N B,C,D = map(int,input().split()) map(int,input().split()) B ok = False False ok ok = True True ok C,D = map(int,input().split()) map(int,input().split()) C ok = True True ok D = map(int,input().split()) map(int,input().split()) D S = input() input() S A,B,C,D = map(int,input().split()) map(int,input().split()) A goal = max(C,D) max(C,D) goal
N,A,B,C,D = map(int,input().split())
S = input()

goal = max(C,D)
if '##' in S[A-1:goal]:
  print("No")
  exit()

ok = True
# 追い越す必要がある
if D < C:
  # 間に3マスあきがない or B,Dの間に3マス空きがない
  if ('...' in S[B-1:D]) or ('...' in S[B-2:B+1]) or ('...' in S[D-2:D+1]):
    ok = True
  else:
    ok = False
# 必要がない場合は問題ない

if ok:
  print("Yes")
else:
  print("No")

