import sys input = sys.stdin.readline N,K=map(int,input().split()) A=list(map(int,input().split())) OK=10**10 NG=-1 while OK>NG+1: mid=(OK+NG)//2 score=0 for a in A: if a<=mid: score+=1 #print(mid,score) if score>=K: OK=mid else: NG=mid #print(OK) ANS=[] for i in range(1,N): if A[i-1]<=OK and A[i]>OK: ANS.append(i+1) print(len(ANS)) print(*ANS)