import re
a, b = map(int, input().split())
s = input()
if s[a] == '-':
  s = re.sub(r'-', '', s)
  print(s)
  if re.fullmatch(r'[0-9]+', s) and len(s) == a + b:
    print('Yes')
  else:
    print('No')
else:
  print('No')