a,b = map(int, input().split())
s = input()

a_cnt = 0
b_cnt = 0
for i in s:
    if i == '-':
        break
    a_cnt += 1

for i in s[b:]:
    if i == '-':
        break
    b_cnt += 1

if a == a_cnt and b == b_cnt:
    print("Yes")
else:
    print("No")