A,B=(int(i) for i in input().split())
S=input()
i=0
r="No"
#rint(S[i].isdigit())
while i<A and S[i].isdigit()==True:
    i+=1
#rint(i)
if i==A and S[i]=="-":
    i+=1
    while i<A+B and S[i].isdigit()==True:
        i+=1
#rint(i)
if i==A+B+1:
    r="Yes"
print(r)