program AGC034A
integer N,A,B,C,D
character(2*10**5) S
logical over,rock2,openspace
read*,N,A,B,C,D
read*,S
rock2=.false.
openspace=.false.
do i=A,C-1
    if(S(i:i+1)=="##")rock2=.true.
end do
do i=B,D-1
    if(S(i:i+1)=="##")rock2=.true.
end do
if(rock2)then
  print"(A)","No"
  stop
endif
do i=B-1,D-1
    if(S(i:i+2)=="...")openspace=.true.
end do
over=(C>D)
if(over)then
  if(.not.openspace)then
    print"(A)","No"
    stop
  endif
endif
print"(A)","Yes"
end