N, A, B, C, D = map(int, input().split())
S = input()
p = 0
t = 0
stri = 0
for i in range(A-1, max(C, D) - 1):
  if S[i:i+2] == '##':
    p = 1
for j in range(B-1, min(C, D) - 1):  
  if S[j:j+3] == '...':
    if stri == 0:
      stri = j + 1
    t = 1
if S[B] == '.' and S[B-2] == '.':
  t = 1
if (C < D and p == 0) or (C > D and p == 0 and t == 1 and stri <= D-1):
  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 p = 0 p 0 t = 0 t 0 stri = 0 stri 0 for i in range(A-1, max(C, D) - 1):
  if S[i:i+2] == '##':
    p = 1 i range(A-1, max(C, D) - 1) range A-1 A 1 max(C, D) - 1 max(C, D) max C D 1 if S[i:i+2] == '##':
    p = 1 S[i:i+2] == '##' S[i:i+2] S i:i+2 i i+2 i 2 '##' p = 1 p 1 for j in range(B-1, min(C, D) - 1):  
  if S[j:j+3] == '...':
    if stri == 0:
      stri = j + 1
    t = 1 j range(B-1, min(C, D) - 1) range B-1 B 1 min(C, D) - 1 min(C, D) min C D 1 if S[j:j+3] == '...':
    if stri == 0:
      stri = j + 1
    t = 1 S[j:j+3] == '...' S[j:j+3] S j:j+3 j j+3 j 3 '...' if stri == 0:
      stri = j + 1
     stri == 0 stri 0 stri = j + 1 stri j + 1 j 1 t = 1 t 1 if S[B] == '.' and S[B-2] == '.':
  t = 1 S[B] == '.' and S[B-2] == '.' S[B] == '.' S[B] S B '.' S[B-2] == '.' S[B-2] S B-2 B 2 '.' t = 1 t 1 if (C < D and p == 0) or (C > D and p == 0 and t == 1 and stri <= D-1):
  print('Yes')
else:
  print('No') (C < D and p == 0) or (C > D and p == 0 and t == 1 and stri <= D-1) C < D and p == 0 C < D C D p == 0 p 0 C > D and p == 0 and t == 1 and stri <= D-1 C > D and p == 0 and t == 1 C > D and p == 0 C > D C D p == 0 p 0 t == 1 t 1 stri <= D-1 stri D-1 D 1 print('Yes') print 'Yes' print('No') print 'No' p = 0 0 p t = 1 1 t A, B, C, D = map(int, input().split()) map(int, input().split()) A t = 0 0 t stri = 0 0 stri S = input() input() S D = map(int, input().split()) map(int, input().split()) D N, A, B, C, D = map(int, input().split()) map(int, input().split()) N C, D = map(int, input().split()) map(int, input().split()) C B, C, D = map(int, input().split()) map(int, input().split()) B stri = j + 1 j + 1 stri p = 1 1 p t = 1 1 t
N, A, B, C, D = map(int, input().split())
S = input()
p = 0
t = 0
stri = 0
for i in range(A-1, max(C, D) - 1):
  if S[i:i+2] == '##':
    p = 1
for j in range(B-1, min(C, D) - 1):  
  if S[j:j+3] == '...':
    if stri == 0:
      stri = j + 1
    t = 1
if S[B] == '.' and S[B-2] == '.':
  t = 1
if (C < D and p == 0) or (C > D and p == 0 and t == 1 and stri <= D-1):
  print('Yes')
else:
  print('No')