a, b = map(int, input().split())
s = input()

if a+b+1 == len(s):
  ok = True
else:
  ok = False
  
for i in range(len(s)):
  if i == a:
    if s[i] != "-":
      ok = False
  if type(s[i]) != int:
    ok = False

if ok:
  print("Yes")
else:
  print("No")