Amr is a young coder who likes music a lot. He always wanted to learn how to play music but he was busy coding so he got an idea.

Amr has n instruments, it takes a_{i} days to learn i-th instrument. Being busy, Amr dedicated k days to learn how to play the maximum possible number of instruments.

Amr asked for your help to distribute his free days between instruments so that he can achieve his goal.


-----Input-----

The first line contains two numbers n, k (1 ≤ n ≤ 100, 0 ≤ k ≤ 10 000), the number of instruments and number of days respectively.

The second line contains n integers a_{i} (1 ≤ a_{i} ≤ 100), representing number of days required to learn the i-th instrument.


-----Output-----

In the first line output one integer m representing the maximum number of instruments Amr can learn.

In the second line output m space-separated integers: the indices of instruments to be learnt. You may output indices in any order.

if there are multiple optimal solutions output any. It is not necessary to use all days for studying.


-----Examples-----
Input
4 10
4 3 1 2

Output
4
1 2 3 4
Input
5 6
4 3 1 1 2

Output
3
1 3 4
Input
1 3
4

Output
0



-----Note-----

In the first test Amr can learn all 4 instruments.

In the second test other possible solutions are: {2, 3, 5} or {3, 4, 5}.

In the third test Amr doesn't have enough time to learn the only presented instrument.

Difficulty: interview

Starter code:

Solutions:
n, k = map(int, input().split())
arr = [int(i) for i in input().split()]
arr2 = []
for i in range(n):
    arr2.append((arr[i], i))
arr2.sort()
ans = []
for i in arr2:
    if k >= i[0]:
        k -= i[0]
        ans.append(i[1])
print(len(ans))
for i in ans:
    print(i + 1, end = ' ')

n,k=map(int,input().split())
L=list(map(int,input().split()))
for i in range(n):
    L[i]=(L[i],i)
L.sort()
ans=0
A=[]
ind=0
while(ind<len(L) and k>=L[ind][0]):
    ans+=1
    A.append(L[ind][1]+1)
    k-=L[ind][0]
    ind+=1
print(ans)
for item in A:
    print(item,end=" ")


n, k = map(int, input().split())
data = list(map(int, input().split()))

data = sorted(zip(data, range(1, len(data) + 1)), key=lambda x: x[0])

inst = []
for x in data:
    if k < x[0]:
        break

    inst.append(x[1])
    k -= x[0]

print(len(inst))
print(' '.join(map(str, inst)))

n, k = [int(i) for i in input().split()]
a = [(int(v), i) for i, v in enumerate(input().split())]

a.sort()
result = []
for v, i in a:
    k -= v
    if k < 0: break
    result.append(i + 1)

result.sort()
print(len(result))
print(' '.join(str(i) for i in result))


n, k = map(int, input().split())
l = [(int(x),i) for i,x in enumerate(input().split())]
l.sort()

days = 0
ans = []
for i in range(len(l)):
    days += l[i][0]

    if days <= k:
        ans.append(str(l[i][1]+1))

print(len(ans))
if len(ans) > 0:
    print(' '.join(ans))

n, k = list(map(int, input().split()))
days = [(int(x), cnt) for cnt, x in enumerate(input().split())]
days.sort()
ans = []
for day, inst in days:
    if day > k:
        break
    else:
        ans.append(str(inst+1))
        k -= day
print(len(ans))
if ans != []:
    print(' '.join(ans))


n,k = list(map(int, input().split()))
ar = list(map(int, input().split()))
ar2 = sorted(ar)
ar3 = sorted(list(enumerate(ar)), key=lambda pair: pair[1])
x = max(i for i in range(len(ar2) + 1) if sum(ar2[:i]) <= k)
print (x)
print(" ".join([str(pair[0] + 1) for pair in ar3[:x]]))


n,m=map(int,input().split())
K=list(map(int,input().split()))
l=L=len(K)
k=[]
while L:
	L-=1
	k.append([K[L],L+1])
k.sort()
s=i=0
while i<l:
	s+=k[i][0]
	if s>m:
		s-=k[i][0]
		break
	i+=1
print(i)
while i:
	i-=1
	if i:print(k[i][1],end=" ")
	else:print(k[i][1])



n, k = map(int, input().split())
arr = list(map(int, input().split()))
arr = [(arr[i], i) for i in range(n)]
arr.sort()
t = 0
res = []
for i in arr:
	res.append(i)
	if(sum([i[0] for i in res])>k):
		res = res[:-1]
		break

if(len(res)==0):
	print('0')
else:
	print(len(res))
	print(' '.join([str(i[1]+1) for i in res]))

n, k = list(map(int, input().split()))
a = list(map(int, input().split()))
b = sorted(a)
result = []
days_used = 0
for i in range(n):
    if days_used + b[i] <= k:
        days_used += b[i]
        result.append(a.index(b[i])+1)
        a[a.index(b[i])] = 0
    else:
        break
print(len(result))
print(' '.join(str(i) for i in result))


n, k = list(map(int, input().split()))
a = [(value, index) for index, value in enumerate(map(int, input().split()), 1)]
a.sort()
result = [ ]
i = 0
while i < len(a) and k >= a[i][0]:
    result.append(a[i][1])
    k -= a[i][0]
    i += 1
print(len(result))
print(' '.join(map(str, result)))


n,k = list(map(int,input().split()))
ins = list(map(int,input().split()))
index = list(range(n))
index.sort(key = lambda x: ins[x])
days = 0
i = 0
ans = []
while True:
	if i >= n:
		break
	days += ins[index[i]]
	if days > k:
		break
	else:
		ans.append(index[i]+1)
	i += 1

print(i)
if i != 0:
	print(" ".join(map(str,ans)))



n, k = map(int, input().split())
M = list(map(int, input().split()))
for i in range(n):
    M[i] = (M[i], i + 1)
M.sort()
if M[0][0] > k:
    print(0)
else:
    used = 0
    i = 0
    Ans = []
    while i < n and used + M[i][0] <= k:
        Ans.append(M[i][1])        
        used += M[i][0]
        i += 1
    print(len(Ans))
    print(" ".join(map(str, Ans)))

n,k = map(int, input().split())
l = list(map(int, input().split()))
q = [[1000000000,10000]]
ans = 0
s = ""
for i in range(n):
    q.append([l[i], i+1])
q = list(sorted(q))
while q[0][0] <= k:
    k -= q[0][0]
    ans += 1
    s += str(q[0][1])+" "
    q.pop(0)
print(ans)
print(s.strip())

def mn(ms):
    ret = min(ms)
    index = ms.index(ret)
    ms[index] = 101
    return [ret, index]
    
n, k = [int(i) for i in input().split()]
ms = [int(i) for i in input().split()]
mx = max(ms)
ret = []
days = 0
p = 0
for i in range(len(ms)):
    box = mn(ms)
    if days + box[0] <= k:
        days += box[0]
        ret.append(box[1] + 1)
        p += 1
print(p)
if ret != []:
    for i in ret:
        print(i, end = ' ')

nk = input()
n, k = [int(i) for i in nk.split(" ")]
a = input()
a = [int(i) for i in a.split(" ")]
b = []
for i in range(len(a)):
    b += [(i, a[i])]
b.sort(key = lambda x:x[1])
m = 0
no = 0
p = []
for i in range(n):
    m += b[i][1]
    if m <= k:
        no += 1
        p.append(b[i][0])
    else:
        break
if len(p)>0:
    print(no)
    for i in p:
        print (i+1, end=" ")
else:
    print(0)


from operator import itemgetter

__author__ = 'Konrad Strack'


def solve():
    n, k = [int(x) for x in input().split()]
    a = [int(x) for x in input().split()]

    indexed = [(i + 1, x) for i, x in enumerate(a)]

    sum = 0
    selected = []
    for i, v in sorted(indexed, key=itemgetter(1)):
        if sum + v <= k:
            sum += v
            selected.append(str(i))
        else:
            break

    print(len(selected))
    if len(selected) > 0:
        print(" ".join(selected))


def __starting_point():
    solve()
__starting_point()

__author__ = 'Hippskill'
def main():
    rdl = list(map(int,input().split()))
    rdl1 = list(map(int,input().split()))
    kl = 0
    need = []
    while rdl[1] > 0:
        current = find_min(rdl1)
        if rdl[1] - rdl1[current] >= 0:
            kl += 1
            need.append(current+1)
            rdl[1] -= rdl1[current]
        else:
            break
        rdl1[current] = 10000000
    print(kl)
    for i in need:
        if i != need[len(need)-1]:
            print(i, end = " ")
        else:
            print(i, end = "")
def find_min(vect):
    mins = 10000000000
    toOut = 0
    for i in range(len(vect)):
        if mins > vect[i]:
            mins = vect[i]
            toOut = i
    return toOut
main()

n, m = map(int,input().split())
list1 = list(map(int, input().split()))
list2 = []
sum = 0
count = len(list1)
for i in range(len(list1)):
    if (min(list1) > m) and i == 0:
        print(0)
        return
    if sum + min(list1) <= m:
        sum += min(list1)

        list2.append(list1.index(min(list1))+1)
        list1[list1.index(min(list1))] = 999999999999
print(len(list2))
print(' '.join(map(str, list2)))

import sys


def main():
	[k, n] = list(map(int, sys.stdin.readline().split()))
	instr_list = list(map(int, sys.stdin.readline().split()))

	arr1 = [(x, i+1) for (i, x) in enumerate(instr_list)]

	arr2 = sorted(arr1)
	# print("arr2 = ")
	# print(arr2)

	summ = 0
	res = []
	for (x, pos) in arr2:
		if summ + x > n:
			break
		else:
			summ += x
			res.append(pos)


	print(len(res))
	if res:
		print(" ".join(map(str, res)))




main()



instr, days = (int(x) for x in input().split())
# print (instr, days)
arr = [(int(y), x + 1) for x, y in enumerate(input().split())]
arr.sort()
if arr[0][0] > days:
	print(0)
else:
	result = []
	for hard in arr:
		days -= hard[0]
		if days >= 0:
			result.append(str(hard[1]))
		else:
			break
	print(len(result))
	print(" ".join(result))


def main():
	n, k = (map(int, input().split()))
	a = list(map(int, input().split()))
	d = {}
	for i in range(n):
		if a[i] in d:
			d[a[i]].append(i+1)
		else:
			d[a[i]] = [i +1]
	count = 0

	ans = []
	

	#print(count)
	

	a.sort()
	s = 0
	count = 0
	b = []
	i = 0
	while (s + a[i]) <= k :
		s += a[i]
		i += 1
		if i == n:
			break

	if i == n:
		count = n
		print (n)
	else:
		print(i )
	for x in range(i):
		print(d[a[x]][0],end = " ")
		d[a[x]].remove(d[a[x]][0])


def __starting_point():
	main()


__starting_point()

N, K = list(map(int, input().split()))
s = list(sorted([(int(n), i) for i, n in enumerate(input().split())]))

ans = []
n = 0
for c, i in s:
    if n + c > K:
        break
    ans.append(i + 1)
    n += c
print(len(ans))
if ans:
    print(' '.join(map(str, ans)))


(n, k) = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
s = 0
ans = []
ans_ = []
b = sorted(a)

for B in b:
    if s+B <= k:
        s += B
        ans_.append(B)
    else:
        break
len_ans_ = len(ans_)
if len_ans_ == 0:
    print(0)
    return
ans.append(a.index(ans_[0])+1)
for i in range(1,len_ans_):
    if ans_[i] == ans_[i-1]:
        ans.append(a[ans[-1]:].index(ans_[i]) + ans[-1] + 1)
    else:
        ans.append(a.index(ans_[i])+1)
ans.sort()

print(len(ans))
if len(ans) > 0:
    print(*ans)


line = input().split()

n = int(line[0])
k = int(line[1])

line = input().split()
lst = list()
for i in range(1, n + 1):
    lst.append((int(line[i - 1]), i))

lst.sort()
s = 0
c = 0
i = 0
ans = ''
while s < k and i < n:
    if s + lst[i][0] <= k:
        ans = ans + str(lst[i][1]) + ' '
        s += lst[i][0]
        c += 1
    else:
        break
    i += 1
print(str(c))
if c > 0:
    print(ans)