A,B = input().split()
S = input()

s = int(A)+int(B)+1
ans = ""

if len(S) > s or len(S) < s or len(S[int(A)+1:s]):
    ans = "No"

elif S[int(A)] == "-":
    S[int(A)] == 0
    for i in range(int(A)+int(B)+1):
        if S[i].isdigit():
            ans = "Yes"
        else:
            ans = "No"

else:
    ans = "No"

print(ans)
