A, B = map(str, input().split())
S = input()

if len(S) == int(A) + int(B) + 1:
    if S[0:int(A) - 1].isdecimal() and S[int(A)] == '-'\
        and S[int(A) + 1].isdecimal():
        print('Yes')
    else:
        print('No')
else:
    print('No')