A,B = map(int,input().split())
S = list(input())
c = 0

if len(S) != A+B+1:
    print("No")
else:
    for i in range(A):
        if S[i] == "-":
            print("No")
            break
        else:
            c += 1
if c == 1 :
    if S[A+1] != "-":
        print("No")
        c += 1
    else:
        for j in range(A+1,A+B+2):
            if S[j] == "-":
                print("No")
                c += 1
                break

if c == 1:
    print("Yes")
