a, b = map(int, input().split())
s = input()

ans = 'Yes'

length = len(s)

for x in range(length):
    if x == a and s[x] != '-':
        ans = 'No'
        break
    else:
        continue

    if '0' <= s[x] and s[x] <= '9':
        continue
    else:
        ans = 'No'
        break

print(ans)
