a,b = map(int,input().split())
stg = input()
res = "Yes"
if len(stg)==a+b+1:
  for i in range(a):
    if not stg[i].isdigit():
      res = "No"
  if not stg[a]=='-':
    res = "No"
  for i in range(a+1,b+1):
    if not stg[i].isdigit():
      res = "No"
else:
  res = "No"
print(res)