A, B = map(int, input().split())
S = list(input())
flag = 1
if not(str.isdecimal(S[:A])):
  flag = 0
if S[A] != "-":
  flag = 0
if not(str.isdecimal(s[A+1:])):
  flag = 0
if flag == 1:
  print("Yes")
else:
  print("No")
