n,a,b,c,d=gets.chomp.split(" ").map(&:to_i)
arr=gets.chomp
a-=1
b-=1
c-=1
d-=1

if c < d
  if not arr[(b+1)..(d-1)].include?("##") and not arr[(a+1)..(c-1)].include?("##")
    puts("Yes")
  else
    puts("No")
  end
else
  tmp=arr[(a+1)..(c-1)]

  if not tmp.include?("##") and arr[(b-1)..(d+1)].include?("...") and not arr[(b+1)..(d-1)].include?("##")
    puts("Yes")
  else
    puts("No")
  end
end
