a,b=map(int,input().split())
S=input()
flag = True
if not S[a]=="-":
  flag = False
if not S[0:a].isdigit():
  flag = False
if not S[a+1:].isdigit():
  falg = False
if flag:
  print("Yes")
else:
  print("No")