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

s = list(input())

if len(s) != a+b+1:
  print("No")
else:
  for i in range(a):
    if s[i] == "-":
      print("No")
      exit()
  if s[a] != "-":
    print("No")
    exit()
  for j in range(a+1,a+b+1):
    if s[j] == "-":
      print("No")
      exit()