a, b = map(int,input().split())
s = input()
if len(s) == a+b+1 and s.count('-') == 1:
  print("Yes")
else:
  print("No")
  exit(0)

s1,s2 = s.split('-')
if a == len(s1) and b == len(s2):
  print("Yes")
else:
  print("No")
