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

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