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

ans = 'Yes'
if (C < D):
  for i in range(B-1,D-1):
    if (S[i] == '#' and S[i+1] == '#'):
      ans = 'No'
      break
  for i in range(A-1,C-1):
    if (S[i] == '#' and S[i+1] == '#'):
      ans = 'No'
      break
else:
  can_over = False
  for i in range(A-1,C-1):
    if (S[i] == '#' and S[i+1] == '#'):
      ans = 'No'
      break
    
  for i in range(B-1,D):
    if (S[i-1] == '.' and S[i] == '.' and S[i+1] == '.'):
      can_over = True
  if (can_over == False):
    ans = 'No'
print(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 = list(input()) S list(input()) list input() input ans = 'Yes' ans 'Yes' if (C < D):
  for i in range(B-1,D-1):
    if (S[i] == '#' and S[i+1] == '#'):
      ans = 'No'
      break
  for i in range(A-1,C-1):
    if (S[i] == '#' and S[i+1] == '#'):
      ans = 'No'
      break
else:
  can_over = False
  for i in range(A-1,C-1):
    if (S[i] == '#' and S[i+1] == '#'):
      ans = 'No'
      break
    
  for i in range(B-1,D):
    if (S[i-1] == '.' and S[i] == '.' and S[i+1] == '.'):
      can_over = True
  if (can_over == False):
    ans = 'No' C < D C D for i in range(B-1,D-1):
    if (S[i] == '#' and S[i+1] == '#'):
      ans = 'No'
      break
   i range(B-1,D-1) range B-1 B 1 D-1 D 1 if (S[i] == '#' and S[i+1] == '#'):
      ans = 'No'
      break
   S[i] == '#' and S[i+1] == '#' S[i] == '#' S[i] S i '#' S[i+1] == '#' S[i+1] S i+1 i 1 '#' ans = 'No' ans 'No' break for i in range(A-1,C-1):
    if (S[i] == '#' and S[i+1] == '#'):
      ans = 'No'
      break i range(A-1,C-1) range A-1 A 1 C-1 C 1 if (S[i] == '#' and S[i+1] == '#'):
      ans = 'No'
      break S[i] == '#' and S[i+1] == '#' S[i] == '#' S[i] S i '#' S[i+1] == '#' S[i+1] S i+1 i 1 '#' ans = 'No' ans 'No' break can_over = False can_over False for i in range(A-1,C-1):
    if (S[i] == '#' and S[i+1] == '#'):
      ans = 'No'
      break
    
   i range(A-1,C-1) range A-1 A 1 C-1 C 1 if (S[i] == '#' and S[i+1] == '#'):
      ans = 'No'
      break
    
   S[i] == '#' and S[i+1] == '#' S[i] == '#' S[i] S i '#' S[i+1] == '#' S[i+1] S i+1 i 1 '#' ans = 'No' ans 'No' break for i in range(B-1,D):
    if (S[i-1] == '.' and S[i] == '.' and S[i+1] == '.'):
      can_over = True
   i range(B-1,D) range B-1 B 1 D if (S[i-1] == '.' and S[i] == '.' and S[i+1] == '.'):
      can_over = True
   S[i-1] == '.' and S[i] == '.' and S[i+1] == '.' S[i-1] == '.' and S[i] == '.' S[i-1] == '.' S[i-1] S i-1 i 1 '.' S[i] == '.' S[i] S i '.' S[i+1] == '.' S[i+1] S i+1 i 1 '.' can_over = True can_over True if (can_over == False):
    ans = 'No' can_over == False can_over False ans = 'No' ans 'No' print(ans) print ans N,A,B,C,D = map(int,input().split()) map(int,input().split()) N can_over = True True can_over S = list(input()) list(input()) S D = map(int,input().split()) map(int,input().split()) D A,B,C,D = map(int,input().split()) map(int,input().split()) A ans = 'Yes' 'Yes' ans ans = 'No' 'No' ans ans = 'No' 'No' ans B,C,D = map(int,input().split()) map(int,input().split()) B ans = 'No' 'No' ans ans = 'No' 'No' ans C,D = map(int,input().split()) map(int,input().split()) C can_over = False False can_over
N,A,B,C,D = map(int,input().split())
S = list(input())

ans = 'Yes'
if (C < D):
  for i in range(B-1,D-1):
    if (S[i] == '#' and S[i+1] == '#'):
      ans = 'No'
      break
  for i in range(A-1,C-1):
    if (S[i] == '#' and S[i+1] == '#'):
      ans = 'No'
      break
else:
  can_over = False
  for i in range(A-1,C-1):
    if (S[i] == '#' and S[i+1] == '#'):
      ans = 'No'
      break
    
  for i in range(B-1,D):
    if (S[i-1] == '.' and S[i] == '.' and S[i+1] == '.'):
      can_over = True
  if (can_over == False):
    ans = 'No'
print(ans)