a, b = map(int, input().split())
s = input()
nums = list(range(10))

if s[a] != '-':
    print('No')
    exit()
else:
    split = s.split('-')
    mae, ushiro = split[0], split[1]
    for m in mae:
        if int(m) not in nums:
            print('No')
            exit()
    for u in ushiro:
        if int(u) not in nums:
            print('No')
            exit()
print('Yes')