numbers = gets.chomp.split(' ').map(&:to_i)
@s = gets.chomp.split('').map(&:to_s)
@n = numbers.first
@a = numbers[1]
@b = numbers[2]
@c = numbers[3]
@d = numbers[4]
@abcd = [@a, @b, @c, @d]

def min_bc
  [@b, @c].min
end

# @return int
# @return false
def double_rock
  @s.each_with_index do |v, i|
    return i + 1 if (v == '#' && @s[i + 1] == '#')
  end
  return false
end

def check_rock
  return if !double_rock
  print 'No' if double_rock < min_bc
  return
end
check_rock

def check_same_number
  print 'No' if @abcd.size != @abcd.uniq.size
  return
end
check_same_number









print 'Yes'
