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

res = 'Yes'
if S[A] != '-' or len(S) != A+B+1:
    res = 'No'
#     print('0')
else:
    for i in range(A):
        if not S[i] in '1234567899':
#             print('1')
            res = 'No'
            break
    for i in range(B):
        if not S[A+i+1] in '1234567890':
#             print('2')
            res = 'No'
            break
print(res)