import re
A, B = map(int,input().split())
S = input()
pattern = r'[0-9]*'
result = re.match(pattern, S)
if re.match(pattern, S[0:A:]) and S[A] == "-" and re.match(pattern, S[A+1:A+B+1:]) and len(S) == A+B+1:
    print("Yes")
else:
    print("No")
