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

def dp(s,g):
  if s==g or s==g-1 or s==g-2:
    return 1
  if S[s+1]=='.' and S[s+2]=='.':
    return DP[s+1]|DP[s+2]
  if S[s+1]=='#' and S[s+2]=='.':
    return DP[s+2]
  if S[s+1]=='.' and S[s+2]=='#':
    return DP[s+1]
  if S[s+1]=='#' and S[s+2]=='#':
    return 0
DP=[0]*(N+1)
for i in range(C,A-1,-1):
  DP[i] = dp(i,C)
ansA = DP[A]
for i in range(D,B-1,-1):
  DP[i] = dp(i,D)
ansB = DP[B]
#print(ansA,ansB)
if C<D:
  ans = ansA & ansB
else:
  ans = ansA & ansB & ('...' in S[B-1:D+2])

Ans = ['No','Yes']
print(Ans[ans]) 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() input def dp(s,g):
  if s==g or s==g-1 or s==g-2:
    return 1
  if S[s+1]=='.' and S[s+2]=='.':
    return DP[s+1]|DP[s+2]
  if S[s+1]=='#' and S[s+2]=='.':
    return DP[s+2]
  if S[s+1]=='.' and S[s+2]=='#':
    return DP[s+1]
  if S[s+1]=='#' and S[s+2]=='#':
    return 0 dp if s==g or s==g-1 or s==g-2:
    return 1
   s==g or s==g-1 or s==g-2 s==g or s==g-1 s==g s g s==g-1 s g-1 g 1 s==g-2 s g-2 g 2 return 1 1 if S[s+1]=='.' and S[s+2]=='.':
    return DP[s+1]|DP[s+2]
   S[s+1]=='.' and S[s+2]=='.' S[s+1]=='.' S[s+1] S s+1 s 1 '.' S[s+2]=='.' S[s+2] S s+2 s 2 '.' return DP[s+1]|DP[s+2] DP[s+1]|DP[s+2] DP[s+1] DP s+1 s 1 DP[s+2] DP s+2 s 2 if S[s+1]=='#' and S[s+2]=='.':
    return DP[s+2]
   S[s+1]=='#' and S[s+2]=='.' S[s+1]=='#' S[s+1] S s+1 s 1 '#' S[s+2]=='.' S[s+2] S s+2 s 2 '.' return DP[s+2] DP[s+2] DP s+2 s 2 if S[s+1]=='.' and S[s+2]=='#':
    return DP[s+1]
   S[s+1]=='.' and S[s+2]=='#' S[s+1]=='.' S[s+1] S s+1 s 1 '.' S[s+2]=='#' S[s+2] S s+2 s 2 '#' return DP[s+1] DP[s+1] DP s+1 s 1 if S[s+1]=='#' and S[s+2]=='#':
    return 0 S[s+1]=='#' and S[s+2]=='#' S[s+1]=='#' S[s+1] S s+1 s 1 '#' S[s+2]=='#' S[s+2] S s+2 s 2 '#' return 0 0 s s g g DP=[0]*(N+1) DP [0]*(N+1) [0] 0 N+1 N 1 for i in range(C,A-1,-1):
  DP[i] = dp(i,C) i range(C,A-1,-1) range C A-1 A 1 -1 DP[i] = dp(i,C) DP[i] DP i dp(i,C) dp i C ansA = DP[A] ansA DP[A] DP A for i in range(D,B-1,-1):
  DP[i] = dp(i,D) i range(D,B-1,-1) range D B-1 B 1 -1 DP[i] = dp(i,D) DP[i] DP i dp(i,D) dp i D ansB = DP[B] ansB DP[B] DP B if C<D:
  ans = ansA & ansB
else:
  ans = ansA & ansB & ('...' in S[B-1:D+2]) C<D C D ans = ansA & ansB ans ansA & ansB ansA ansB ans = ansA & ansB & ('...' in S[B-1:D+2]) ans ansA & ansB & ('...' in S[B-1:D+2]) ansA & ansB ansA ansB '...' in S[B-1:D+2] '...' S[B-1:D+2] S B-1:D+2 B-1 B 1 D+2 D 2 Ans = ['No','Yes'] Ans ['No','Yes'] 'No' 'Yes' print(Ans[ans]) print Ans[ans] Ans ans D = map(int, input().split()) map(int, input().split()) D DP=[0]*(N+1) [0]*(N+1) DP B, C, D = map(int, input().split()) map(int, input().split()) B ansB = DP[B] DP[B] ansB N, A, B, C, D = map(int, input().split()) map(int, input().split()) N ans = ansA & ansB & ('...' in S[B-1:D+2]) ansA & ansB & ('...' in S[B-1:D+2]) ans ansA = DP[A] DP[A] ansA C, D = map(int, input().split()) map(int, input().split()) C Ans = ['No','Yes'] ['No','Yes'] Ans S = '.'+input() '.'+input() S def dp(s,g):
  if s==g or s==g-1 or s==g-2:
    return 1
  if S[s+1]=='.' and S[s+2]=='.':
    return DP[s+1]|DP[s+2]
  if S[s+1]=='#' and S[s+2]=='.':
    return DP[s+2]
  if S[s+1]=='.' and S[s+2]=='#':
    return DP[s+1]
  if S[s+1]=='#' and S[s+2]=='#':
    return 0 def dp(s,g):
  if s==g or s==g-1 or s==g-2:
    return 1
  if S[s+1]=='.' and S[s+2]=='.':
    return DP[s+1]|DP[s+2]
  if S[s+1]=='#' and S[s+2]=='.':
    return DP[s+2]
  if S[s+1]=='.' and S[s+2]=='#':
    return DP[s+1]
  if S[s+1]=='#' and S[s+2]=='#':
    return 0 dp ans = ansA & ansB ansA & ansB ans A, B, C, D = map(int, input().split()) map(int, input().split()) A
N, A, B, C, D = map(int, input().split())
S = '.'+input()

def dp(s,g):
  if s==g or s==g-1 or s==g-2:
    return 1
  if S[s+1]=='.' and S[s+2]=='.':
    return DP[s+1]|DP[s+2]
  if S[s+1]=='#' and S[s+2]=='.':
    return DP[s+2]
  if S[s+1]=='.' and S[s+2]=='#':
    return DP[s+1]
  if S[s+1]=='#' and S[s+2]=='#':
    return 0
DP=[0]*(N+1)
for i in range(C,A-1,-1):
  DP[i] = dp(i,C)
ansA = DP[A]
for i in range(D,B-1,-1):
  DP[i] = dp(i,D)
ansB = DP[B]
#print(ansA,ansB)
if C<D:
  ans = ansA & ansB
else:
  ans = ansA & ansB & ('...' in S[B-1:D+2])

Ans = ['No','Yes']
print(Ans[ans])