N, A, B, C, D = gets.chomp.split(" ").map(&:to_i)
s = gets.chomp

if s[A-1..C-1].include?("##") || s[B-1..D-1].include?("##") then
  puts "No"
else
  if D > C then
    puts "Yes"
  elsif s[B-2..D+1].include?("...") then
    puts "Yes"
  else
    puts "No"
  end
end
