n,a,b,c,d = map(int,input().split())
s = input()
S = s[:max(c,d)]
#print(S)
l = len(S)
C = True
D = False
for i in range(l-1):
  if i >= min(a,b) and S[i]=='#' and S[i+1]=='#':
    C = False
    break
  if c > d and d > i >= max(a,b)-1:
    if S[i-1]=='.' and S[i]=='.' and S[i+1]=='.':
      D = True
      
if not C:
  print('No')
elif C and not D:
  if c < d:
    print('Yes')
  else:
    print('No')
else:
  print('Yes') 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 S = s[:max(c,d)] S s[:max(c,d)] s :max(c,d) max(c,d) max c d l = len(S) l len(S) len S C = True C True D = False D False for i in range(l-1):
  if i >= min(a,b) and S[i]=='#' and S[i+1]=='#':
    C = False
    break
  if c > d and d > i >= max(a,b)-1:
    if S[i-1]=='.' and S[i]=='.' and S[i+1]=='.':
      D = True
       i range(l-1) range l-1 l 1 if i >= min(a,b) and S[i]=='#' and S[i+1]=='#':
    C = False
    break
   i >= min(a,b) and S[i]=='#' and S[i+1]=='#' i >= min(a,b) and S[i]=='#' i >= min(a,b) i min(a,b) min a b S[i]=='#' S[i] S i '#' S[i+1]=='#' S[i+1] S i+1 i 1 '#' C = False C False break if c > d and d > i >= max(a,b)-1:
    if S[i-1]=='.' and S[i]=='.' and S[i+1]=='.':
      D = True
       c > d and d > i >= max(a,b)-1 c > d c d d > i >= max(a,b)-1 d > i d i max(a,b)-1 max(a,b) max a b 1 if S[i-1]=='.' and S[i]=='.' and S[i+1]=='.':
      D = 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 '.' D = True D True if not C:
  print('No')
elif C and not D:
  if c < d:
    print('Yes')
  else:
    print('No')
else:
  print('Yes') not C C print('No') print 'No' elif C and not D:
  if c < d:
    print('Yes')
  else:
    print('No') C and not D C not D D if c < d:
    print('Yes')
  else:
    print('No') c < d c d print('Yes') print 'Yes' print('No') print 'No' print('Yes') print 'Yes' a,b,c,d = map(int,input().split()) map(int,input().split()) a C = False False C D = True True D s = input() input() s l = len(S) len(S) l C = True True C n,a,b,c,d = map(int,input().split()) map(int,input().split()) n S = s[:max(c,d)] s[:max(c,d)] S D = False False D d = map(int,input().split()) map(int,input().split()) d c,d = map(int,input().split()) map(int,input().split()) c b,c,d = map(int,input().split()) map(int,input().split()) b
n,a,b,c,d = map(int,input().split())
s = input()
S = s[:max(c,d)]
#print(S)
l = len(S)
C = True
D = False
for i in range(l-1):
  if i >= min(a,b) and S[i]=='#' and S[i+1]=='#':
    C = False
    break
  if c > d and d > i >= max(a,b)-1:
    if S[i-1]=='.' and S[i]=='.' and S[i+1]=='.':
      D = True
      
if not C:
  print('No')
elif C and not D:
  if c < d:
    print('Yes')
  else:
    print('No')
else:
  print('Yes')