Mike has always been thinking about the harshness of social inequality. He's so obsessed with it that sometimes it even affects him while solving problems. At the moment, Mike has two sequences of positive integers A = [a1, a2, ..., an] and B = [b1, b2, ..., bn] of length n each which he uses to ask people some quite peculiar questions.

To test you on how good are you at spotting inequality in life, he wants you to find an "unfair" subset of the original sequence. To be more precise, he wants you to select k numbers P = [p1, p2, ..., pk] such that 1 ≤ pi ≤ n for 1 ≤ i ≤ k and elements in P are distinct. Sequence P will represent indices of elements that you'll select from both sequences. He calls such a subset P "unfair" if and only if the following conditions are satisfied: 2·(ap1 + ... + apk) is greater than the sum of all elements from sequence A, and 2·(bp1 + ... + bpk) is greater than the sum of all elements from the sequence B. Also, k should be smaller or equal to <image> because it will be to easy to find sequence P if he allowed you to select too many elements!

Mike guarantees you that a solution will always exist given the conditions described above, so please help him satisfy his curiosity!

Input

The first line contains integer n (1 ≤ n ≤ 105) — the number of elements in the sequences. 

On the second line there are n space-separated integers a1, ..., an (1 ≤ ai ≤ 109) — elements of sequence A.

On the third line there are also n space-separated integers b1, ..., bn (1 ≤ bi ≤ 109) — elements of sequence B.

Output

On the first line output an integer k which represents the size of the found subset. k should be less or equal to <image>.

On the next line print k integers p1, p2, ..., pk (1 ≤ pi ≤ n) — the elements of sequence P. You can print the numbers in any order you want. Elements in sequence P should be distinct.

Example

Input

5
8 7 4 8 3
4 2 5 3 7


Output

3
1 4 5

Difficulty: VERY_HARD
Tags: Sorting

Constructive algorithms
Skill types: Sorting

Starter code:

Solutions:
n = int(input())
A = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]
idAB = zip(range(n), A, B)
idAB = sorted(idAB, key=lambda x: x[1], reverse=True)
ans = [idAB[0][0] + 1]
i = 1
while i < n:
	choice = max(idAB[i:i + 2], key=lambda x: x[2])
	ans.append(choice[0] + 1)
	i += 2
ans = sorted(ans)
print(len(ans))
print(*ans)


import random
import datetime
random.seed(datetime.datetime.now())
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

def valid(arr):
	return sum((A[k] for k in arr)) * 2 > sum(A) and sum((B[k] for k in arr)) * 2 > sum(B)
ans = [i for i in range(N)]
while not valid(ans[:N // 2 + 1]):
	random.shuffle(ans)
print(N // 2 + 1)
print(*list(map(lambda x: x + 1, ans[:N // 2 + 1])))


n = int(input())
a = [[] for i in range(1, n + 2)]
b = [[] for i in range(1, n + 2)]
cnt = 0
for i in input().split():
	cnt += 1
	a[cnt] = [-int(i), cnt]
cnt = 0
for i in input().split():
	cnt += 1
	b[cnt] = [-int(i), cnt]
node = []
use = [0 for i in range(1, n + 3)]
if n % 2 == 0:
	a.sort()
	for i in range(1, n + 1, 2):
		if -b[a[i][1]][0] > -b[a[i + 1][1]][0]:
			node.append(a[i][1])
			use[a[i][1]] = 1
		else:
			node.append(a[i + 1][1])
			use[a[i + 1][1]] = 1
	for i in range(1, n + 1):
		if use[a[i][1]] == 0:
			node.append(a[i][1])
			break
if n % 2 == 1:
	a.sort()
	use[a[1][1]] = 1
	node.append(a[1][1])
	for i in range(2, n + 1, 2):
		if -b[a[i][1]][0] > -b[a[i + 1][1]][0]:
			node.append(a[i][1])
			use[a[i][1]] = 1
		else:
			node.append(a[i + 1][1])
			use[a[i + 1][1]] = 1
print(len(node))
for i in range(len(node)):
	print(int(node[i]), end=' ')


n = int(input())
r = list(zip(map(int, input().split()), map(int, input().split()), [x for x in range(1, n + 1)]))
r.sort()
print('{}\n{}'.format(n // 2 + 1, r[n - 1][2]), end=' ')
for i in range(n - 2, 0, -2):
	print(r[i][1] < r[i - 1][1] and r[i - 1][2] or r[i][2], end=' ')
if n & 1 == 0:
	print(r[0][2])


N = int(input())
a = [int(x) for x in input().strip().split(' ')]
b = [int(x) for x in input().strip().split(' ')]
p = []
for i in range(N):
	p.append((a[i], b[i], i + 1))
p.sort(reverse=True)
r = []
r.append(p[0][2])
for i in range(1, N, 2):
	t = p[i][2]
	if i + 1 < N and p[i + 1][1] > p[i][1]:
		t = p[i + 1][2]
	r.append(t)
print(len(r))
print(' '.join([str(x) for x in r]))


n = int(input())
r = sorted(zip(map(int, input().split()), map(int, input().split()), range(1, n + 1)))
print('%d\n%d' % (n // 2 + 1, r[n - 1][2]), end=' ')
for i in range(n - 2, 0, -2):
	print(r[i][1] < r[i - 1][1] and r[i - 1][2] or r[i][2], end=' ')
if ~n & 1:
	print(r[0][2])


n = int(input())
a = map(int, input().split())
b = map(int, input().split())
indice = sorted(zip(a, b, range(1, n + 1)), reverse=True)
rel = []
rel.append(indice[0][2])
for i in range(1, n, 2):
	tmp = indice[i][2]
	if i < n - 1 and indice[i + 1][1] > indice[i][1]:
		tmp = indice[i + 1][2]
	rel.append(tmp)
print(str(len(rel)) + '\n')
print(*rel)


n = int(input())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
c = list(range(n))
c = sorted(c, key=lambda x: -a[x])
print(n // 2 + 1)
i = 0
while i < (n + 1) % 2 + 1:
	print(c[i] + 1, end=' ')
	i += 1
while i < n:
	if b[c[i]] > b[c[i + 1]]:
		print(c[i] + 1, end=' ')
	else:
		print(c[i + 1] + 1, end=' ')
	i += 2


import sys
input = sys.stdin.readline
n = int(input())
arr = list(map(int, input().split()))
brr = list(map(int, input().split()))
ida = list(range(n))
print((n >> 1) + 1)
an = []
ida.sort(key=lambda x: -arr[x])
an.append(ida[0] + 1)
for i in range(1, n, 2):
	if n - 1 == i:
		an.append(ida[i] + 1)
	elif brr[ida[i]] >= brr[ida[i + 1]]:
		an.append(ida[i] + 1)
	else:
		an.append(ida[i + 1] + 1)
print(*an)


n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
p = sorted(zip(range(1, n + 1), a, b), key=lambda x: -x[1])
ans = [p[0][0]]
for i in range(1, n, 2):
	ans.append(max(p[i:i + 2], key=lambda x: x[2])[0])
ans = sorted(ans)
print(len(ans))
print(*ans)


from functools import cmp_to_key
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
ord = sorted(list((i for i in range(N))), key=cmp_to_key(lambda x, y: A[y] - A[x]))
ans = [ord[0]]
for i in range(1, N, 2):
	if i + 1 == N:
		ans.append(ord[i])
	elif B[ord[i]] >= B[ord[i + 1]]:
		ans.append(ord[i])
	else:
		ans.append(ord[i + 1])
print(len(ans))
print(*list(map(lambda x: x + 1, ans)))


from sys import stdin, stdout
import random
n = int(stdin.readline().rstrip())
a = stdin.readline().rstrip().split()
a = [int(x) for x in a]
b = stdin.readline().rstrip().split()
b = [int(x) for x in b]
currentSeq = [(a[0], b[0], 1)]
stock = 0
i = 1
seqTotal = [a[0], b[0]]
listTotal = [a[0], b[0]]
while i < n:
	if i % 2 == 1:
		stock += 1
	listTotal[0] += a[i]
	listTotal[1] += b[i]
	if (2 * seqTotal[0] <= listTotal[0] or 2 * seqTotal[1] <= listTotal[1]) and stock > 0:
		stock -= 1
		seqTotal[0] += a[i]
		seqTotal[1] += b[i]
		currentSeq.append((a[i], b[i], i + 1))
	elif 2 * seqTotal[0] <= listTotal[0] or 2 * seqTotal[1] <= listTotal[1]:
		seqTotal[0] += a[i]
		seqTotal[1] += b[i]
		currentSeq.append((a[i], b[i], i + 1))
		random.shuffle(currentSeq)
		for j in range(len(currentSeq)):
			if 2 * (seqTotal[0] - currentSeq[j][0]) > listTotal[0] and 2 * (seqTotal[1] - currentSeq[j][1]) > listTotal[1]:
				seqTotal[0] -= currentSeq[j][0]
				seqTotal[1] -= currentSeq[j][1]
				currentSeq.pop(j)
				break
	i += 1
c = [str(x[2]) for x in currentSeq]
print(len(c))
print(' '.join(c))