n,a,b,c,d=gets.chomp.split(" ").map{|s| s.to_i}
s=gets.chomp.gsub(/\./,"a")

if c<d
  if (s[a-1..d-1].scan(/(a+)/).map{|q| q[0].size}.max || 0) >= 2
    puts "Yes"
  else
    puts "No"
  end
else
  if  (s[b-1..d-1].scan(/(a+)/).map{|q| q[0].size}.max || 0) >= 3
    puts "Yes"
  else
    puts "No"
  end
end
