a,b=map(int,input().split())
s=input()
if '-' not in s or s.count('-')>1 or s[0]==1 or s[-1]:
    print('No')
    exit()

p=s.split('-')
print('No' if s[a]!='-' or len(p[0]!=a or len(p[1])!=b) else 'Yes')