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

flg ="Yes"

if n[a] != "-":
    flg ="No"

s = set([0,1,2,3,4,5,6,7,8,9])

if not (set(n[0:a]) | set(n[a+1:a+b+1])) <=s:
    flg = "No"

print(flg)
