A, B = map(int, (input().split()))
S = input().split('-')
ans = len(S) == 2
ans = False if not ans else A == len(S[0]) and B == len(S[1])
ans = False if not ans else A == len(str(int(S[0]))) and B == len(str(int(S[1])))
print('Yes' if ans else 'No')