def pC():
    A, B = map(int, input().split())
    S = list(input())
    for i in range(A):
        if S[i].isdecimal() == 0:
            print("No")
            return
    if S[A] != "-":
        print("No")
        return
    for i in range(A + 2, B):
        if S[i].isdecimal() == 0:
            print("No")
            return
    print("Yes")


pC()
