#coding:utf-8

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

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

else:
    Flag = 0
    for i in range(A):
        if S[i] <= '0' or S[i] >= '9':
            Flag = 1
    for i in range(A+1,len(S)):
        if S[i] <= '0' or S[i] >= '9':
            Flag = 1

    if Flag == 1:
        print "No"
    else:
        print "Yes"
