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

if s[(a - 1)..(d - 1)].each_cons(2).any? { |e| e == ['#', '#'] }
  puts :No
  exit
end

if c < d
  puts :Yes
else
  if s[(b - 2)..d].each_cons(3).any? { |e| e == ['.', '.', '.'] }
    puts :Yes
    exit
  end

  puts :No
end