a,b = map(int,input().split())
s = input()
L = [i for i in range(1,10)]
ans = "Yes"
for i in range(a):
  if  not int(s[i]) in L:
    ans = "No"
if s[a] != "-":
  ans = "No"
for i in range(a+1,a+b+1):
    if  not int(s[i]) in L:
    ans = "No"
print(ans)