# ABC 084: B – Postal Code
characters = '0123456789-'

a, b = [int(s) for s in input().split()]
s = input()

is_postal = 'Yes'

if s[a] != '-':
    is_postal = 'No'

for c in s:
    if c not in characters:
        is_postal = 'No'
        break

print(is_postal)