AB = input()
S = input()

A = int(AB.split(" ")[0])
B = int(AB.split(" ")[1])

ints = "0123456789"


flag = True

if len(S) != A + B + 1:
    flag = False

if flag:
    for i in range(len(S)):
        if i != A:
            if not(S[i] in ints):
                flag = False
                return
        else:
            if S[i] != "-":
                flag = False
                return

if flag:
    print("Yes")
else:
    print("No")
