# Postal Code
a, b = map(int, input().split())
s = input()
for i, char in enumerate(s):
    if i == a:
        if char != '-':
            exit(print('No'))
    else:
        if '0' <= char <= '9':
            pass
        else:
            exit(print('No'))
