import sys
a,b = map(int,input().split())
s = input()
if s[a] == '-':
    s = s.replace(s[a],'')
    if s.isdecimal():
        print('Yes')
        sys.exit()
    else:
        print('No')
        sys.exit()
else:
  print('No')
