n,a,b,c,d=map(int,input().split())
s=str(input())
s=list(s)
cnts=0
cnti=0
space=0
iwa=0
temp=0
next=0
if c<d:
  for i in range(a-1,d):
    if s[i]==".":
      cnts=cnts+1
      space=max(space,cnts)
      cnti=0
    else:
      cnti=cnti+1
      iwa=max(iwa,cnti)
      cnts=0
  if iwa>1:
    print("No")
  else:
    print("Yes")
else:
  for i in range(a-1,c):
    if s[i]==".":
      if i<=b-2:
        cnts=0
      cnts=cnts+1
      space=max(space,cnts)
      cnti=0
    else:
      cnti=cnti+1
      iwa=max(iwa,cnti)
      cnts=0
    if i==d-1:
      temp=space
      if s[i-1]=="." and s[i+1]==".":
        next=1
  if iwa>1:
    print("No")
  elif temp<3 and next==0:
    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=str(input()) s str(input()) str input() input s=list(s) s list(s) list s cnts=0 cnts 0 cnti=0 cnti 0 space=0 space 0 iwa=0 iwa 0 temp=0 temp 0 next=0 next 0 if c<d:
  for i in range(a-1,d):
    if s[i]==".":
      cnts=cnts+1
      space=max(space,cnts)
      cnti=0
    else:
      cnti=cnti+1
      iwa=max(iwa,cnti)
      cnts=0
  if iwa>1:
    print("No")
  else:
    print("Yes")
else:
  for i in range(a-1,c):
    if s[i]==".":
      if i<=b-2:
        cnts=0
      cnts=cnts+1
      space=max(space,cnts)
      cnti=0
    else:
      cnti=cnti+1
      iwa=max(iwa,cnti)
      cnts=0
    if i==d-1:
      temp=space
      if s[i-1]=="." and s[i+1]==".":
        next=1
  if iwa>1:
    print("No")
  elif temp<3 and next==0:
    print("No")
  else:
    print("Yes") c<d c d for i in range(a-1,d):
    if s[i]==".":
      cnts=cnts+1
      space=max(space,cnts)
      cnti=0
    else:
      cnti=cnti+1
      iwa=max(iwa,cnti)
      cnts=0
   i range(a-1,d) range a-1 a 1 d if s[i]==".":
      cnts=cnts+1
      space=max(space,cnts)
      cnti=0
    else:
      cnti=cnti+1
      iwa=max(iwa,cnti)
      cnts=0
   s[i]=="." s[i] s i "." cnts=cnts+1 cnts cnts+1 cnts 1 space=max(space,cnts) space max(space,cnts) max space cnts cnti=0 cnti 0 cnti=cnti+1 cnti cnti+1 cnti 1 iwa=max(iwa,cnti) iwa max(iwa,cnti) max iwa cnti cnts=0 cnts 0 if iwa>1:
    print("No")
  else:
    print("Yes") iwa>1 iwa 1 print("No") print "No" print("Yes") print "Yes" for i in range(a-1,c):
    if s[i]==".":
      if i<=b-2:
        cnts=0
      cnts=cnts+1
      space=max(space,cnts)
      cnti=0
    else:
      cnti=cnti+1
      iwa=max(iwa,cnti)
      cnts=0
    if i==d-1:
      temp=space
      if s[i-1]=="." and s[i+1]==".":
        next=1
   i range(a-1,c) range a-1 a 1 c if s[i]==".":
      if i<=b-2:
        cnts=0
      cnts=cnts+1
      space=max(space,cnts)
      cnti=0
    else:
      cnti=cnti+1
      iwa=max(iwa,cnti)
      cnts=0
     s[i]=="." s[i] s i "." if i<=b-2:
        cnts=0
       i<=b-2 i b-2 b 2 cnts=0 cnts 0 cnts=cnts+1 cnts cnts+1 cnts 1 space=max(space,cnts) space max(space,cnts) max space cnts cnti=0 cnti 0 cnti=cnti+1 cnti cnti+1 cnti 1 iwa=max(iwa,cnti) iwa max(iwa,cnti) max iwa cnti cnts=0 cnts 0 if i==d-1:
      temp=space
      if s[i-1]=="." and s[i+1]==".":
        next=1
   i==d-1 i d-1 d 1 temp=space temp space if s[i-1]=="." and s[i+1]==".":
        next=1
   s[i-1]=="." and s[i+1]=="." s[i-1]=="." s[i-1] s i-1 i 1 "." s[i+1]=="." s[i+1] s i+1 i 1 "." next=1 next 1 if iwa>1:
    print("No")
  elif temp<3 and next==0:
    print("No")
  else:
    print("Yes") iwa>1 iwa 1 print("No") print "No" elif temp<3 and next==0:
    print("No")
   temp<3 and next==0 temp<3 temp 3 next==0 next 0 print("No") print "No" print("Yes") print "Yes" space=max(space,cnts) max(space,cnts) space s=str(input()) str(input()) s cnti=0 0 cnti c,d=map(int,input().split()) map(int,input().split()) c iwa=0 0 iwa space=max(space,cnts) max(space,cnts) space iwa=max(iwa,cnti) max(iwa,cnti) iwa cnti=0 0 cnti next=0 0 next cnti=cnti+1 cnti+1 cnti cnts=cnts+1 cnts+1 cnts s=list(s) list(s) s cnts=0 0 cnts b,c,d=map(int,input().split()) map(int,input().split()) b cnts=0 0 cnts d=map(int,input().split()) map(int,input().split()) d cnts=cnts+1 cnts+1 cnts temp=space space temp cnts=0 0 cnts next=1 1 next cnts=0 0 cnts iwa=max(iwa,cnti) max(iwa,cnti) iwa cnti=cnti+1 cnti+1 cnti space=0 0 space cnti=0 0 cnti n,a,b,c,d=map(int,input().split()) map(int,input().split()) n a,b,c,d=map(int,input().split()) map(int,input().split()) a temp=0 0 temp
n,a,b,c,d=map(int,input().split())
s=str(input())
s=list(s)
cnts=0
cnti=0
space=0
iwa=0
temp=0
next=0
if c<d:
  for i in range(a-1,d):
    if s[i]==".":
      cnts=cnts+1
      space=max(space,cnts)
      cnti=0
    else:
      cnti=cnti+1
      iwa=max(iwa,cnti)
      cnts=0
  if iwa>1:
    print("No")
  else:
    print("Yes")
else:
  for i in range(a-1,c):
    if s[i]==".":
      if i<=b-2:
        cnts=0
      cnts=cnts+1
      space=max(space,cnts)
      cnti=0
    else:
      cnti=cnti+1
      iwa=max(iwa,cnti)
      cnts=0
    if i==d-1:
      temp=space
      if s[i-1]=="." and s[i+1]==".":
        next=1
  if iwa>1:
    print("No")
  elif temp<3 and next==0:
    print("No")
  else:
    print("Yes")