A, B = map(int, input().split())
S = input()

count = 0
S_list = []
for s in S:
    S_list.append(s)
    if s == '-':
        break
    else:
        count += 1

u_count = S_list.count('-')

if count == A and u_count == 1:
    print('Yes')
else:
    print('No')
    