A,B=map(int,input().strip().split(" "))
S=input()

for i in range(A):
    if(S[i]!=(0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9)):
        print("No")
        quit()
for i in range(A+1,A+B+1):
    if(S[i]!=(0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9)):
        print("No")
        quit()
        

if(len(S)==A+B+1 and S[A]=='-' ):
    print("Yes")
else:
    print("No")
