a, b = map(int, input().split())
s = input()
a_str = s[0:a]
b_str = s[a+1:a+b+1]

if len(a_str) == a and len(b_str) == b and s[a] == "-" and str.isdecimal(a_str) and str.isdecimal(a_str):
    print("Yes")
else:
    print("No")