import sys
from collections import Counter

a, b = map(int, input().split())
s = input()
  
try:
    fs = int(s[:a])
    if s[a] != '-':
        raise NotHyphenError()
    ls = int(s[a+1:-1])
    if len(str(ls)) == b:
        raise LenMissMatchError()
except:
    print('No')
    sys.exit()

print('Yes')
