import re
a, b = map(int, input().split())
s = input()

if s[a] != "-" or s[0:a] in r'[^0-9]' or s[a+1::] in r'[^0-9]':
    print("No")
elif len(s[0:a]) != a or len(s[a+1::]) != b:
    print("No")
else:
    print("Yes")
