A,B = map(int, input().split())
S = str(input())
for i,s in enumerate(S):
    if not i == A and S[i] == '-':
        print("NO")
        exit()
print('YES' if S[A] == '-' and len(S) == A+B+1 else "NO")    