N, K = map(int, input().split()) A = list(map(int, input().split())) A_sorted = sorted(A) sleep_value = A_sorted[K - 1] ans = [] for k in range(1, N): if A[k - 1] <= sleep_value and A[k] > sleep_value: ans.append(k + 1) print(len(ans)) print(*ans)