a,b=[int(i) for i in input().split()]
s=input()
ans=0
if s[a]!="-":
    ans+=1
else:
    front=s[:a]
    back=s[a+1:]
    if ("-" not in front) and ("-" not in front):
        pass
    else:
        ans+=1
if ans==0:
    print("Yes")
else:
    print("No")
        