a,b = map(int,input().split())
s = [_ for _ in input()]

ok = True
for i in range(len(s)):
  if i == a+1:
    if s[i] != '-':
      ok = False
  elif ord('0') <= ord(s[i]) <= ord('9'):
     continue
  else:
    ok = False
if ok:
  print('Yes')
else:
  print('No')