n, a, b, c, d = gets.chomp.split.map(&:to_i)
s = gets.chomp
  (b-1).upto(d-2) do |i|
    if s[i] == "#" && s[i+1] == "#"
      puts "No"
      exit
    end
  end
  (a-1).upto(c-2) do |i|
    if s[i] == "#" && s[i+1] == "#"
      puts "No"
      exit
    end
  end
if c < d
  puts "Yes"
elsif d < c
  (b-2).upto(d-2) do |i|
    if s[i] == "." && s[i+1] == "." && s[i+2] == "."
      puts "Yes"
      exit
    end
  end
  puts "No"
end
