A, B = map(int, input().split())
S = input()
for i in range(A+B+1):
    if S[A] == '-':
        if S[:A-1].isdecimal() == True and S[A+1:].isdecimal() == True:
            print('Yes')
            break
        else:
            print('No')
            break
else:
    print('No')