a, b = map(int, raw_input().split())
s = raw_input().split('-')
print 'Yes' if len(s[0]) == a and not [_ for _ in s[0] if _ not in '0123456789'] and \
               len(s[1]) == b and not [_ for _ in s[1] if _ not in '1234567890'] else 'No'
