import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
#input = sys.stdin.readline

#
#alist = []

n,k = map(int,input().split())
alist = list(map(int,input().split()))
blist = alist[:]
blist.sort()
x = blist[k-1]
#for i in range(n):
#    alist.append(list(map(int,input().split())))
ans = []
for i in range(n-1):
    if alist[i] <= x and alist[i+1] > x:
        ans.append(i+2)
print(len(ans))
print(*ans)