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

blocks = [n+1, n+2]

s.each.with_index(1) do |block, i|
  blocks << i if block == '#'
end

while !( a == c && b == d ) || !( blocks.include?(a+1) && blocks.include?(a+2) && blocks.include?(b+1) && blocks.include?(b+2) )
  if a != c
    if !blocks.include?(a+1) && !(a+1 == b)
      a += 1
    elsif !blocks.include?(a+2)
      a += 2
    end
  end

  if b != d
    if !blocks.include?(b+1)
      b += 1
    elsif !blocks.include?(b+2)
      b += 2
    end
  end
end

if a == c && b == d
  puts 'Yes'
else
  puts 'No'
end