a, b = [int(i) for i in input().split()]
yubin = input()
answer = ''

for i in range(a):
    if yubin[i] == '-':
        answer = 'No'

if yubin[a] != '-':
    answer = 'No'

for i in range(a + 1, b):
    if yubin[i] == '-':
        answer = 'No'

if answer == 'No':
    print('No')
else:
    print('Yes')