a,b=map(int,input().split())
#print(ab)
x=input()
#print(x)
x1=x[:a]
x2=x[a]
x3=x[a+1:a+b+1]
if x2=="-" and  all(int(x1[i])>=0 and int(x1[i])<=9 for i in range(a)) and all(int(x3[j])>=0 and int(x3[j])<=9 for j in range(b)):
    print("Yes")
else:
    print("No")