a,b = map(int,input().split())
s = list(input())
ans = True
if len(s) != a+b+1:
    ans = 'No'
else:
    for i in range(a+b+1):
        if i == a and s[i] != '-':
            ans = 'No'
            break
        if not s[i].isdigit() and i != a:
            ans ='No'
            break
print (ans)