A,B=map(int,input().split())
S=input()
number=0
list=[0,1,2,3,4,5,6,7,8,9]
for a in range(A):
    if int(S[a]) in list:
        number+=1
if S[A]=='-':
    number+=1
for a in range(B):
    if int(S[A+a+1]) in list:
        number+=1
if number==A+B+1:
    print('Yes')
else:
    print('No')
    