# -*- coding: utf-8 -*-
a, b = map(int, raw_input().split())
s = raw_input()
ok = False
if len(s) == (a+b+1):
  n = s.count('-')
  if n == 1:
    x,y = map(str, s.split('-'))
    if len(x) == a:
      if len(y) == b:
        ok = True

if ok:
  print 'Yes'
else:
  print 'No'