a,b=map(int,input().split())
s=str(input())
slist=list(s)
temp=slist.count("-")
if temp==1 and slist[a]=="-":
  s.replace("","-")
  if s.isdecimal()==True:
    print("Yes")
  else:
    print("No")
else:
  print("No")
