n, a, b, c, d = gets.split.map(&:to_i)
ss = gets.chomp
isok_a = isok_b = true

ac = ss[a - 1...c]
isok_a = false if ac.include?("##")

bd = ss[b - 1...d]
if c > d && !ss[b - 2..d].include?("...")
  isok_b = false
end

puts [isok_a, isok_b].all? ? "Yes" : "No"
