n, a, b, c, d = gets.split.map(&:to_i)
s = gets.chomp
s = " " + s
flag = true
sa = s.slice(a, c-a+1)
flag = false if sa.include?("##")
sb = s.slice(b, d-b+1)
flag = false if sb.include?("##")
if c > d
  s_over = s.slice(b-1, c-b)
  flag = false if !s_over.include?("...")
end
puts flag ? "Yes" : "No"
