A, B = map(int, input().split())
S = input().rstrip()
if len(S) == A + B + 1 and S[A] == '-':
    for s in (S[:A]+S[A+1:]):
        if s in list(map(str, range(0, 10))):
            continue
        else:
            print('No')
            exit(0)
    print('Yes')
    exit(0)
print('No')
exit(0)