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


if len(S) != A + B + 1 or '-' not in S or not re.match('[0-9\-]', S[-1]):
    print 'No'
else:
    a, b = map(len, S.split('-'))[:2]
    if a != A or b != B:
        print 'No'
    else:
        print 'Yes'

