n, a, b, c, d = gets.chomp.split.map(&:to_i)
s = gets.chomp
if s[b..d-2].include?("##") || s[a..c-2].include?("##")
  puts "No"
else
  if c < d
    puts "Yes"
  else
    if s[b-2..d].include?("...")
      puts "Yes"
      exit
  	end
    puts "No"
  end
end