#coding:utf-8

A, B = map(int,raw_input().split())
S = raw_input()

if S[A] != '-':
    print "No"

elif (A != 0) and (S[0:A] in "-"):
    print "No"

elif (B != 0) and (S[A+1:len(S)] in "-"):
    print "No"

else:
    print "Yes"
