a,b = map(int,input().split())
s = input()
s_list = s
s_list = list(s_list)
flg = False

for i in range(len(s_list)):
    if i == '-':
        s_list.pop(i)
        flg = True
        break

if flg:
    if len(s_list) == a + b:
        print('Yes')
    else:
        print('No')
else:
    print('No')


'''


if s[a:a+1] == '-' and s[0:a].isdecimal() and s[a+1:a+b+1]:
    print('Yes')
else:
    print('No')
#print(s[0:a])
#print(s[a+1:a+b+1])

print(s)
print(s_list)
'''