a,b=map(int, input().split())
s=input()
l=len(s)
f=0
for i in s:
    if i=='-':
        f=f+1

if f==1:
    k=s.index('-')
    su=(k-0)
    f=(l-(k+1))
    if su==a and f==b and b==a+1:
        print("Yes")

else:
    print("No")
