a,b=map(int,input().split())
s=str(input())
c=0-b
if len(s) == a+b+1:
  if s[:a-1].isdecimal()==True and s[c:].isdecimal()==True and s[a]=="-":
    print("Yes")
  else:
    print("No")
else:
  print("No")