program kadai
implicit none
integer  ::  n,a,b,c,d,i,flag,open_flag,op
integer,allocatable  ::  rock(:)
character(len=200000)  ::  s

read(*,*) n,a,b,c,d
read(*,*) s
allocate(rock(n))

do i=1,n
    if(s(i:i)==".") then
        rock(i)=1
    end if
    if (s(i:i)=='#') then
        rock(i)=2
    end if
end do

flag=0
open_flag=0
op=0


do i=b,d
    if (rock(i)==2) then
        if (flag==1) then
            write(*,*) "No"
            stop
        else
            flag=1
            open_flag=0
        end if
    end if
    if(rock(i)==1) then
        flag=0
        open_flag=open_flag+1
        if(open_flag==3) then
            op=1
        end if
    end if
end do

flag=0
do i=a,c
    if (rock(i)==2) then
        if (flag==1) then
            write(*,*) "No"
            stop
        else
            flag=1
        end if
    end if
    if(rock(i)==1) then
        flag=0
    end if
end do

if (c>d) then
    if (op==1) then
        write(*,*) "Yes"
    else
        write(*,*) "No"
    end if
end if

if (c<d) then
    write(*,*) "Yes"
end if

end program kadai