n, a, b, c, d = gets.split.map(&:to_i)
s = gets.chomp.split('').map(&:to_s)
if n == 4
  if s.include?('#')
    puts 'No'
  else
    puts 'Yes'
  end
elsif c < d
  puts 'Yes'
elsif c > d
  cnt = 0
  s.each_with_index do |a,i|
    j = i + 1
    if a == '.'
      cnt += 1
    else
      cnt = 0
    end
    if cnt == 3 && j <= d
      puts 'Yes'
      exit
    end
  end
  puts 'No'
end
