a, b = map(int, input().split())
s = input()
ans = 'Yes'

if s[a]!='-':
  ans = 'No'
else:
  s = s.replace('-', '')
  if len(s)==0:
    ans = 'No'
  if not all([i in '0123456789' for i in s]):
    ans = 'No'

    
print(ans)