a, b = map(int, input().split())
s = input()
deg = '0123456789'
for i in range(a + b + 1):
  if i == a:
    if s[i] != '-':
      print('No')
      exit()
  if s[i] not in deg:
    print('No')
    exit()
print('Yes')