Vasya is going to the Olympics in the city Ntown by train. The boy wants to read the textbook to prepare for the Olympics. He counted that he needed k hours for this. He also found that the light in the train changes every hour. The light is measured on a scale from 0 to 100, where 0 is very dark, and 100 is very light.

Vasya has a train lighting schedule for all n hours of the trip — n numbers from 0 to 100 each (the light level in the first hour, the second hour and so on). During each of those hours he will either read the whole time, or not read at all. He wants to choose k hours to read a book, not necessarily consecutive, so that the minimum level of light among the selected hours were maximum. Vasya is very excited before the upcoming contest, help him choose reading hours.


-----Input-----

The first input line contains two integers n and k (1 ≤ n ≤ 1000, 1 ≤ k ≤ n) — the number of hours on the train and the number of hours to read, correspondingly. The second line contains n space-separated integers a_{i} (0 ≤ a_{i} ≤ 100), a_{i} is the light level at the i-th hour.


-----Output-----

In the first output line print the minimum light level Vasya will read at. In the second line print k distinct space-separated integers b_1, b_2, ..., b_{k}, — the indexes of hours Vasya will read at (1 ≤ b_{i} ≤ n). The hours are indexed starting from 1. If there are multiple optimal solutions, print any of them. Print the numbers b_{i} in an arbitrary order.


-----Examples-----
Input
5 3
20 10 30 40 10

Output
20
1 3 4 

Input
6 5
90 20 35 40 60 100

Output
35
1 3 4 5 6 



-----Note-----

In the first sample Vasya should read at the first hour (light 20), third hour (light 30) and at the fourth hour (light 40). The minimum light Vasya will have to read at is 20.

Difficulty: interview

Starter code:

Solutions:
def readln(): return tuple(map(int, input().split()))

import sys
sys.stdin = open('input.txt', 'r')
sys.stdout = open('output.txt', 'w')

n, k = readln()
lst = [(v, i + 1) for i, v in enumerate(readln())]
lst.sort()
lst.reverse()
print(lst[k - 1][0])
print(*list(zip(*lst[:k]))[1])


import sys
sys.stdin = open('input.txt', 'r')
sys.stdout = open('output.txt', 'w')

n, k = map(int, input().split())
p = [(x, i) for i, x in enumerate(list(map(int, input().split())), 1)]
p.sort(reverse = True)
print(p[k - 1][0])
print(' '.join(str(x[1]) for x in p[:k]))

fc = open('input.txt', 'r')
n,k = [ int(x) for x in fc.readline().strip().split() ]
line = fc.readline().strip().split()
b = [ (int(line[i]), i+1) for i in range(len(line)) ]
b.sort()
l = list()
for i in range(len(b)-k,len(b)):
  l.append(str(b[i][1]))
fw = open('output.txt', 'w')
fw.write('{0}\n'.format(b[len(b)-k][0]))
fw.write(' '.join(l))
fw.write('\n')
fc.close()
fw.close()



def main():
    f=open("input.txt");
    inp= f.readline().strip().split()
    inp=[int(i) for i in inp];
    num= f.readline().strip().split()
    num=[int(i) for i in num];
    num2=[];
    for i in range(len(num)):
        num2.append(num[i]);
    num2.sort()
    num2.reverse()
    x=int(inp.pop())
    y = num2[x-1];
    p=[];
    cont=0;
    for i in range(len(num)):
        if(num[i]>=y and cont<x):
            p.append(i+1);
            cont+=1
    t=open("output.txt","w");
    t.write(str(y)+"\n");
    t.write(' '.join(str(e) for e in p)+"\n");
    t.close()
    f.close()
    
main()



def main():
    f=open("input.txt");
    inp= f.readline().strip().split()
    inp=[int(i) for i in inp];
    num= f.readline().strip().split()
    num=[int(i) for i in num];
    num2=[];
    for i in range(len(num)):
        num2.append(num[i]);
    num2.sort()
    num2.reverse()
    x=int(inp.pop())
    y = num2[x-1];
    p=[];
    cont=0;
    for i in range(len(num)):
        if(num[i]>=y and cont<x):
            p.append(i+1);
            cont+=1
    t=open("output.txt","w");
    t.write(str(y)+"\n");
    t.write(' '.join(str(e) for e in p)+"\n");
    t.close()
    f.close()
    
main()


def main():
    f=open("input.txt","r")
    inp= f.readline().split()
    inp=[int(i) for i in inp];
    num= f.readline().split()
    num=[int(i) for i in num];
    num2=[];
    for i in range(len(num)):
        num2.append(num[i]);
    num2.sort()
    num2.reverse()
    x=int(inp.pop())
    y = num2[x-1];
    p=[];
    cont=0;
    for i in range(len(num)):
        if(num[i]>=y and cont<x):
            p.append(i+1);
            cont+=1
    g=open("output.txt","w") 
    g.write(str(y))
    g.write("\n")
    g.write(' '.join(str(e) for e in p));
    g.close()
    f.close()
main()


from sys import stdin
def main():
    f=open("input.txt")
    fin=open("output.txt","w")
    horas=[int(x)for x in f.readline().strip().split()]
    luz=[int(x)for x in f.readline().strip().split()]
    posiciones=list(range(1,len(luz)+1))   
    s=list(zip(luz,posiciones))
    x=list()
    s.sort()
    z=list()
    eliminado=horas[0]-horas[1]
    for i in range(eliminado,len(s)):
        x.append(s[i])
    for u in range (len(x)):
        z.append(x[u][1])
    z.sort()    
    fin.write(str(x[0][0]) + "\n")
    for c in range(len(z)):
        fin.write( str(z[c]) + " ")

    fin.close()
    f.close()
main()


from sys import stdin
def main():
    f=open("input.txt")
    fin=open("output.txt","w")
    horas=[int(x)for x in f.readline().strip().split()]
    luz=[int(x)for x in f.readline().strip().split()]
    posiciones=list(range(1,len(luz)+1))   
    s=list(zip(luz,posiciones))
    x=list()
    s.sort()
    z=list()
    eliminado=horas[0]-horas[1]
    for i in range(eliminado,len(s)):
        x.append(s[i])
    for u in range (len(x)):
        z.append(x[u][1])
    z.sort()    
    fin.write(str(x[0][0]) + "\n")
    for c in range(len(z)):
        fin.write( str(z[c]) + " ")

    fin.close()
    f.close()
main()

def main():
	a=open('input.txt','r')
	c=open('output.txt','w')
	b=a.readline().split()
	n=int(b[0])
	k=int(b[1])
	b=a.readline().split()
	h=[]
	d=[]
	for i in range (len(b)):
		h.append((int(b[i]),i+1))
	h.sort()
	for i in range (1,k+1):
		d.append(h[-i])
	d.sort()
	e=str(d[0][0])	
	c.write('{0}\n' .format(e))
	f=[]
	for i in range (len(d)):
		f.append(d[i][1])
	f.sort()
	for i in range (len(f)):
		g=str(f[i])
		c.write(g+" ")
main()


def main():
	a=open('input.txt','r')
	c=open('output.txt','w')
	b=a.readline().split()
	n=int(b[0])
	k=int(b[1])
	b=a.readline().split()
	h=[]
	d=[]
	for i in range (len(b)):
		h.append((int(b[i]),i+1))
	h.sort()
	for i in range (1,k+1):
		d.append(h[-i])
	d.sort()
	e=str(d[0][0])	
	c.write('{0}\n' .format(e))
	f=[]
	for i in range (len(d)):
		f.append(d[i][1])
	f.sort()
	for i in range (len(f)):
		g=str(f[i])
		c.write(g+" ")
main()



fi = open('input.txt', 'r')
n, k = map(int, fi.readline().split())
a = sorted(zip(map(int, fi.readline().split()), range(1, n + 1)))
fo = open('output.txt', 'w')
print(str(a[n - k][0]), file=fo)
print(' '.join(str(ai[1]) for ai in a[n - k:]), file=fo)

with open('input.txt') as fin:
	lines = fin.readlines()
_, k = map(int, lines[0].split())
lights = sorted((int(light), i + 1) for i, light in enumerate(lines[1].split()))
itops = sorted(i for _, i in lights[-k:])
with open('output.txt', 'w') as fout:
	print(lights[-k][0], file=fout)
	print(' '.join(map(str, itops)), file=fout)

import sys
sys.stdin = open('input.txt', 'r')
sys.stdout = open('output.txt', 'w')
n,k = list(map(int, input().split()))
A = []
for i,light in enumerate(list(map(int, input().split()))):
    A.append((light,i))
A.sort(reverse=True)
print(A[k-1][0])
out = [A[i][1]+1 for i in range(k)]
print(" ".join(map(str, out)))

'''
Created on May 4, 2016
@author: Md. Rezwanul Haque
'''
import sys 
from audioop import reverse
sys.stdin = open("input.txt","r");
sys.stdout = open("output.txt","w");

n,k = map(int,input().split())
p = [(x,i)for i,x in enumerate (list(map(int,input().split())),1)]
#print(p)
p.sort(reverse = True)
#print(p)
print(p[k-1][0])
print(" ".join(str(x[1])for x in p[:k]))

def main():
    with open("input.txt", "r") as f:
        n, k, = list(map(int, f.readline().split()))
        l = [-1] + list(map(int, f.readline().split()))
    idx = sorted(list(range(1, n + 1)), key=l.__getitem__, reverse=True)[:k]
    with open("output.txt", "w") as f:
        f.writelines((str(l[idx[-1]]), '\n', ' '.join(map(str, idx))))


def __starting_point():
    main()

__starting_point()

F=open('input.txt','r')
I=lambda:list(map(int,F.readline().split()))
n,k=I()
a=I()
m=sorted(range(1,n+1),key=lambda x:a[x-1])[-k:]
W=open('output.txt','w')
W.write(str(a[m[0]-1])+'\n'+' '.join(map(str,m)))
W.close()

F=open('input.txt','r')
I=lambda:list(map(int,F.readline().split()))
n,k=I()
a=I()
m=sorted(range(1,n+1),key=lambda x:a[x-1])[-k:]
W=open('output.txt','w')
W.write(str(a[m[0]-1])+'\n'+' '.join(map(str,m)))
W.close()

f = open("input.txt", "r")
g = open("output.txt", "w")
n, k = map(int, f.readline().split())
a = [(x+1, int(y)) for x, y in enumerate(f.readline().split())]
a = sorted(a, key=lambda x: x[1])[::-1]
g.write(str(a[k-1][1]) + "\n")
for z in a[:k]:
	g.write(str(z[0]) + " ")
f.close()
g.close()

F=open('input.txt','r')
I=lambda:list(map(int,F.readline().split()))
n,k=I()
a=I()
m=sorted(range(1,n+1),key=lambda x:a[x-1])[-k:]
W=open('output.txt','w')
W.write(str(a[m[0]-1])+'\n'+' '.join(map(str,m)))
W.close()

'''
def main():
	from sys import stdin,stdout
def __starting_point():
	main()
'''
#349B
'''
def main():
	from sys import stdin,stdout
	N = int(stdin.readline())
	arr = list(map(int,stdin.readline().split()))
	div = []
	for i in arr:
		div.append(N//i)
	maxim = 0
	maxindex = -1
	for i in range(9):
		if div[i] >maxim:
			maxim = div[i]
			maxindex = i
	if maxindex > -1:
		ans = [ (maxindex+1) for i in range(maxim)]
		N= N%arr[maxindex]
		#print(N)
		i = 0
		while i<maxim:
			#print('i=',i,'N=',N)
			for j in range(8,maxindex,-1):
				#print('j=',j,'diff=',arr[j]-arr[ans[i]-1])
				if arr[j]-arr[ans[i]-1] <=N:
					N -= arr[j]-arr[ans[i]-1]
					ans[i] = j+1
					break
			i+=1
		for i in ans:
			stdout.write(str(i))
	else:
		stdout.write('-1\n')
def __starting_point():
	main()
'''
#234B Input and Output
def main():
	from sys import stdin,stdout
	import collections
	with open('input.txt','r') as ip:
		N,K = list(map(int,ip.readline().split()))
		arr = list(map(int,ip.readline().split()))
	mydict = collections.defaultdict(set)
	for i in range(len(arr)):
		mydict[arr[i]].add(i+1)
	ans = []
	i=0
	while K>0:
		for it in mydict[sorted(list(mydict.keys()),reverse=True)[i]]:
			ans.append(it)
			K-=1
			if K<1:
				break
		minim=i
		i+=1
	with open('output.txt','w') as out:
		out.write(str(sorted(list(mydict.keys()),reverse=True)[minim])+'\n')
		ans=' '.join(str(x) for x in ans)
		out.write(ans+'\n')		
def __starting_point():
	main()

__starting_point()

F=open('input.txt','r')

I=lambda:list(map(int,F.readline().split()))

n,k=I()

a=I()

m=sorted(list(range(1,n+1)),key=lambda x:a[x-1])[-k:]

W=open('output.txt','w')

W.write(str(a[m[0]-1])+'\n'+' '.join(map(str,m)))

W.close()



# Made By Mostafa_Khaled


import sys
from math import *

f = open('input.txt', 'r')
out = open('output.txt', 'w')

def minp():
	return f.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())

n, k = mints()
a = []
j = 0
for i in mints():
	j += 1
	a.append((-i, j))
a.sort()
print(-a[k-1][0], file=out)
for i in range(k):
	print(a[i][1], end=' ', file=out)
f.close()
out.close()

#!/usr/bin/env python

def main():

    text_input = []
    with open('input.txt', 'r') as f:
        text_input = f.readlines()
    
    n, k = [int(c) for c in text_input[0].split()]
    lights = [(int(c), i) for i, c in enumerate(text_input[1].split())]
    lights.sort(reverse=True)
    res = [str(lights[i][1] + 1) for i in range(k)]
    with open('output.txt', 'w') as f:
        print(lights[k-1][0], file=f)
        print(' '.join(res), file=f)
    

def __starting_point():
    main()

__starting_point()

f = open("input.txt","r")
n, k = map(str,f.readline().split())
f1 = open("output.txt","w")
n = int(n); k = int(k)
b = []; c = []
a = list(map(str,f.readline().split()))
for i in range(len(a)): a[i] = int(a[i])
p = 0
for i in range(len(a)):
    for j in range(len(a)):
        if a[i] <= a[j] and i != j: p += 1
    if p >= k-1: b.append(a[i])
    p = 0
f1.write(str(max(b)))
p = 0
c.append(a.index(max(b))+1)
for i in range(len(a)):
    if a[i] >= max(b) and p < k-1 and i+1 not in c:
        c.append(i+1); p += 1
c.sort()
f1.write("\n")
for i in range(len(c)): f1.write(str(c[i])); f1.write(" ")
f.close(); f1.close()

def f(idl,idr,x):
    if idr-idl<2:
        return
    m=(idr+idl)//2
    i=idl
    j=m
    f(idl,m,x)
    f(m,idr,x)
    a = []
    for k in range(idr-idl):
        if j >= idr or (i < m and x[i]<x[j]):
            a.append(x[i])
            i+=1
        else:
            a.append(x[j])
            j+=1
    for k in range(idr - idl):
        x[k+idl] = a[k]

fi = open('input.txt', 'r')
n,k=map(int,fi.readline().split())
a=fi.readline().split()
a=[[int(a[x]),x+1] for x in range(n)]
f(0,n,a)
fo = open('output.txt', 'w')
print(a[-k][0], file=fo)
print(*[ x[1] for x in a[-k:]], file=fo)