inputs = Array.new
while line = $stdin.gets
  inputs << line.chomp
end

N, A, B, C, D = inputs[0].split(" ").map(&:to_i)

s = "#" + inputs[1]
can_b_to_d = !s[B..D].include?("##")
can_a_to_c = !s[A..C].include?("##")

if C > D && can_a_to_c
  can_a_to_c = s[B..D].include?("...")
end

puts can_a_to_c && can_b_to_d ? "Yes" : "No"
