A, B = map(int,input().split())
S = str(input())
c = A+B+1
if len(S)==c and S.find("-")==1 and str.isdecimal(S[0:S.find("-")]) and str.isdecimal(S[S.find("-")+1:len(S)]):
    print("Yes")
else:
    print("No")