n, a, b, c, d = *gets.chomp.split.map(&:to_i)
s = gets.chomp.split(//)
if c < d
  puts 'Yes'
  exit
end
s.each_cons(3).with_index do |ss, ssi|

  if ss == %w[. . .] && (b-1 <= ssi) && (ssi <= d-2)
    puts 'Yes'
    exit
  end
end
puts 'No'
