from collections import Counter
a,b = map(int,input().split())
s = input()

if s.count('-')==1:
    li = s.split('-')
    if len(li[0])==a and len(li[1])==b:
        print('Yes')
else:
    print('No')

