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