import re
(A,B),S = map(int,input().split()),input()


if (len(S) == (A+B+1)) and (S[A] == '-') and (S.count('-') == 1) and len(re.findall('[0-9]', S)) == (A+B):
    print("yes")
else:
    print("No")
