def resolve():
    A, B = map(int, input().split())
    S = input()
    C = "1234567890"
    if S[A] == "-":
        S.replace(S[A], "0")
        for i in range(len(S)):
            if S[i] in C:
                continue
            else:
                print("No")
                exit()
        print("Yes")
        exit()
    else:
        print("No")
resolve()