import sys

a,b=map(int,input().split())
ss=input().strip()

if len(ss) != (a+b+1):
  print("No")
  sys.exit()

#a 3  123-345
nums=[0,1,2,3,4,5,6,7,8,9]

for i in range(len(ss)):
  if i==a:
    if ss[i]!="-":
      print("No")
      sys.exit()
  elif int(ss[i]) not in nums:
    print("No")
    sys.exit()
print("Yes")