a,b=map(int,input().split())
s=str(input())
f=0
if s[a] !="-":
    f =0
else:
    c=s[:a]
    d=s[b:]
    if len(c)==a and len(d)==b:
        if "-" not in c:
            if "-" not in d:
                f=1
print("Yes" if f==1 else "No")