A,B = [int(i) for i in input().split()]
S = input()

# 先頭A文字が数字か？,A+1文字目がハイフンか？,残りB文字が数字か？
cond = [True,True,True]
for i in range(A):
  if S[i] not in '0123456789':
    cond[0]=False
if S[A]!='-':
  cond[1]=False
for i in range(A+1,B):
  if S[i] not in '0123456789':
    cond[2]=False

if all(cond):
  print('Yes')
else:
  print('No')