a,b=map(int,input().split())
s=input()
print(s)
if s[a]!="-":
    print("No")
    #print(1)
elif s.count("-")>1:
    print("No")
    #print(2)
else:
    s=s.replace("-","")
    #print(3)
    #print(s)
    if s.isdigit()==True:
        print("Yes")
    else:
        print("No")