A, B = tuple(int(num) for num in input().split())
S = input()

s_list = list(S)
  

for i, s in enumerate(s_list):
  if s_list[A] != '-':
    print('No')
    break
  if isinstance(s, int):
    continue
  else:
    print('No')
    break
else:
  print('Yes')