p=input().split()
A=int(p[0])
B=int(p[1])
S=input()
if S[A]=="-":
    t=S.split('-')
    if len(t)==2:
        a,b=int(t[0]),int(t[1])
        if 10**(A-1)<=a<10**A and 10**(B-1)<=b<10**B:
            print("Yes")
        else:
            print("No")
    else:
         print("No")
else:
     print("No")