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

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