l=[str(i) for i in range(10)]
n,m=map(int,input().split())
w=input()
for i in range(n):
  if w[i] in l:
    pass
  else:
    print("No")
    exit()
if w[i]!="-":
  print("No")
  exit()
for i in range(m):
  if w[i+1+n] in l:
    pass
  else:
    print("No")
    exit()
print("Yes")