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]
@output = 'Yes'

def no
  @output = 'No'
end

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

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

def check_rock
  return if !double_rock
  no if double_rock < min_bc
end
check_rock

def check_same_number
  no if @abcd.size != @abcd.uniq.size
end
check_same_number

# @return Bool
def c_is_bigger_than_d
  @c > @d
end

def check_bigger
  if c_is_bigger_than_d
    if !triple_empty
      no
    elsif @c <= triple_empty
      no
    elsif triple_empty < @b
      no
    end
  end
end
check_bigger

print @output