a, b = map(int, input().split())
s0 = input()
s = [x for x in s0]

if len(s) != a + b + 1:
  print('No')
  exit()

for i in range(a):
  if s[i] != '0' and s[i] != '1' and s[i] != '2' and s[i] != '3' and s[i] != '4' and s[i] != '5' and s[i] != '6' and s[i] != '7' and s[i] != '8' and s[i] != '9':
    print('No')
    exit()
if s[a] != '-':
  print('No')
  exit()
for i in range(a+1, b):
  if s[i] != '0' and s[i] != '1' and s[i] != '2' and s[i] != '3' and s[i] != '4' and s[i] != '5' and s[i] != '6' and s[i] != '7' and s[i] != '8' and s[i] != '9':
    print('No')
    exit()
print('Yes')