n,a,b,c,d = gets.chomp.split(" ").map(&:to_i)
s = gets.chomp
stop = []
(n-1).times do |i|
  if s[i] == '#' && s[i+1] == '#'
    stop.push(i)
  end
end
stop.each do |x|
  if (x+1 > a && x+2 < c) || (x+1 > b && x+2 < d)
    puts "No"
    exit
  end
end
if b < c && c < d
  puts "Yes"
elsif b < c && c > d
  (b-1).upto(d-3) do |i|
    if s[i] == '.' && s[i+1] == '.' && s[i+2] == '.'
      puts "Yes"
      exit
    end
  end
  puts "No"
else
  puts "Yes"
end