A, B = map(int, input().split())
S = input()
C = "1234567890"
if S[A] == "-":
  for i in range(len(S)):
    if i != A-1:
      if A[i] in C:
        continue
      else:
        print("No")
        exit()
else:
  print("No")