import math

is_no = 0
num1, num2 = map(int, input().split())
str1 = input()
table = list(str1)
for i in range(num1):
    if table[i].isdigit():
        continue
    else:
        is_no = 1
if table[num1] != '-':
    is_no = 1
for j in range(num2, num1+num2+1):
    if table[j].isdigit():
        continue
    else:
        is_no = 1
if is_no == 0:
    print('Yes')
elif is_no == 1:
    print('No')
