A,B=map(int,input().split())
S=input()
i=0
while S[i]!="-":
    i+=1
    if  S[i]=="-":
        break
    if i+1==len(S):
        break
if A==i and B==len(S[i+1:len(S)]):
    print("Yes")
else:
    print("No")