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

s = input()

flg = False
for idx,i in enumerate(s):
    if i == '-' and idx == a:
        flg = True
    else:
        flg = False
    
print('Yes' if flg else 'No')
