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