n, a, b, c, d = gets.chomp.split.map(&:to_i)
a -= 1
b -= 1
c -= 1
d -= 1
s = gets.chomp.chars

if c < b
  snuke = s[a..c].chunk{|ch| ch }.map{|ch, items| [ch, items.size] }
  hnuke = s[b..d].chunk{|ch| ch }.map{|ch, items| [ch, items.size] }
  if snuke.any? {|ch, l| ch == "#" && l >= 2 } || hnuke.any? {|ch, l| ch == "#" && l >= 2 }
    puts "No"
  else
    puts "Yes"
  end
else
  lb = a
  ub = [d, c].max
  while lb > 0 && s[lb] == "."
    lb -= 1
  end
  while ub < n - 1 && s[ub] == "."
    ub += 1
  end
  
  maze = s[lb..ub].chunk{|ch| ch }.map{|ch, items| [ch, items.size] }
  if maze.any? {|ch, l| ch == "." && l >= 3 }
    puts "Yes"
  elsif c < d
    puts "Yes"
  else
    puts "No"
  end
end