A, B = map(int,input().split())
s = input()
if '-' in s and s.index('-')==A:
  num = [i for i in range(10)]
  for n in range(A):
    if s[n] in num ==False:
      break
    else:
      pass
  for m in range(A+1,A+1+B):
    if s[m] in num ==False:
      break
    else:
      print('Yes')
      exit()
else:
  pass
print('No')