Baby Ehab was toying around with arrays. He has an array $a$ of length $n$. He defines an array to be good if there's no way to partition it into $2$ subsequences such that the sum of the elements in the first is equal to the sum of the elements in the second. Now he wants to remove the minimum number of elements in $a$ so that it becomes a good array. Can you help him?

A sequence $b$ is a subsequence of an array $a$ if $b$ can be obtained from $a$ by deleting some (possibly zero or all) elements. A partitioning of an array is a way to divide it into $2$ subsequences such that every element belongs to exactly one subsequence, so you must use all the elements, and you can't share any elements.


-----Input-----

The first line contains an integer $n$ ($2 \le n \le 100$) — the length of the array $a$.

The second line contains $n$ integers $a_1$, $a_2$, $\ldots$, $a_{n}$ ($1 \le a_i \le 2000$) — the elements of the array $a$.


-----Output-----

The first line should contain the minimum number of elements you need to remove.

The second line should contain the indices of the elements you're removing, separated by spaces.

We can show that an answer always exists. If there are multiple solutions, you can print any.


-----Examples-----

Input
4
6 3 9 12
Output
1
2
Input
2
1 2
Output
0


-----Note-----

In the first example, you can partition the array into $[6,9]$ and $[3,12]$, so you must remove at least $1$ element. Removing $3$ is sufficient.

In the second example, the array is already good, so you don't need to remove any elements.

Difficulty: MEDIUM_HARD
Tags: Dynamic programming

Bit manipulation

Mathematics

Constructive algorithms
Skill types: Dynamic programming

Bit manipulation

Starter code:

Solutions:
import collections
import itertools
from functools import reduce
mod = 10 ** 9 + 7

def permutationbysum():
	for _ in range(int(input())):
		(num, l, r, achieve) = map(int, input().split())
		k = r - l + 1
		if k * (k + 1) // 2 <= achieve <= k * (num * 2 + 1 - k) // 2:
			outpos = r % num
			inpos = l - 1
			ans = [0] * num
			for i in range(num, 0, -1):
				if achieve - i > 0 or (achieve - i == 0 and inpos == r - 1):
					achieve -= i
					ans[inpos] = i
					inpos += 1
				else:
					ans[outpos] = i
					outpos += 1
					outpos %= num
			print(*ans)
		else:
			print(-1)

def peaks():
	for _ in range(int(input())):
		(num, peak) = map(int, input().split())
		pos = 1
		rpos = num
		ans = []
		now = 0
		if num == 1:
			if not peak:
				print(1)
			else:
				print(-1)
			continue
		if num == 2:
			if peak:
				print(-1)
			else:
				print(1, 2)
			continue
		added = 0
		while rpos + 1 != pos:
			if not peak:
				while pos <= rpos:
					ans.append(pos)
					pos += 1
				break
			if not now:
				ans.append(pos)
				pos += 1
			else:
				ans.append(rpos)
				rpos -= 1
				if num - added != 1:
					peak -= 1
			added += 1
			now = 1 - now
		if peak:
			print(-1)
			continue
		print(*ans)
import sys
input = sys.stdin.readline

def addone():
	for _ in range(int(input())):
		(num, changes) = input().split()
		l = collections.deque(sorted([int(i) for i in num]))
		perm = collections.deque()
		changes = int(changes)
		cd = 0
		ans = len(num)
		while True:
			nextnum = l.pop()
			while perm and perm[-1] == nextnum:
				l.append(perm.pop())
			c = 10 - nextnum - cd
			changes -= c
			cd += c
			if changes >= 0:
				if not c:
					perm.appendleft(1 - cd)
					l.appendleft(-cd)
				else:
					l.appendleft(1 - cd)
					l.appendleft(-cd)
				ans += 1
			else:
				break
		print(ans % 1000000007)
import math

def andsequences():

	def mapping(num):
		nonlocal mnum
		nonlocal c
		num = int(num)
		if num < mnum:
			mnum = num
			c = 1
		elif num == mnum:
			c += 1
		return num
	mod = 1000000007
	for _ in range(int(input())):
		mnum = float('inf')
		c = 0
		num = int(input())
		l = list(map(mapping, input().split()))
		for i in l:
			if mnum & i != mnum:
				print(0)
				break
		else:
			if c == 1:
				print(0)
			else:
				print(math.factorial(num - 2) * (c - 1) * c % mod)

def numberdigit():
	n = 10 ** 5 * 2
	l = [0] * 11
	mod = 10 ** 9 + 7
	l[0] = l[1] = l[2] = l[3] = l[4] = l[5] = l[6] = l[7] = l[8] = 2
	l[9] = 3
	l[10] = 4
	for i in range(11, n):
		l.append((l[i - 10] + l[i - 9]) % mod)
	for _ in range(int(input())):
		(num, c) = input().split()
		c = int(c)
		ans = 0
		for i in num:
			i = int(i)
			if 10 - i > c:
				ans += 1
			else:
				ans += l[c - (10 - i)]
		print(ans % mod)

def mushroom():
	(people, t1, t2, percent) = map(int, input().split())
	l = []
	percent = 1 - percent * 0.01
	for i in range(1, people + 1):
		(s, s1) = map(int, input().split())
		l.append([i, max(s * t1 * percent + s1 * t2, s1 * t1 * percent + s * t2)])
	l.sort(key=lambda x: x[1], reverse=True)
	for i in l:
		i[1] = '{:.2f}'.format(i[1])
		print(*i)

def escape():
	prins = int(input())
	dra = int(input())
	start = int(input())
	pack = int(input())
	c = int(input())
	speeddiff = dra - prins
	if speeddiff <= 0:
		return 0
	pd = start * prins
	ans = 0
	while pd < c:
		hs = pd / speeddiff
		pd += prins * hs
		if pd >= c:
			break
		time = pd / dra
		time += pack
		pd += prins * time
		ans += 1
	return ans

def perm():

	def high(n, k):
		return k * (2 * n - k + 1) // 2

	def low(k):
		return k * (k + 1) // 2
	for _ in range(int(input())):
		(num, lef, rig, s) = map(int, input().split())
		k = rig - lef + 1
		(rig, lef) = (rig - 1, lef - 1)
		if not high(num, k) >= s >= low(k):
			print(-1)
			continue
		l = [0] * num
		lp = lef
		rp = lef - 1
		for i in range(num, 0, -1):
			if high(i, k) >= s and s - i >= low(k - 1) and k:
				l[lp] = i
				lp += 1
				s -= i
				k -= 1
			else:
				l[rp] = i
				rp -= 1
		if k:
			print(-1)
		else:
			print(*l)

def newcom():
	for _ in range(int(input())):
		(days, price) = map(int, input().split())
		dl = input().split()
		worth = input().split()
		worth.append(0)
		ans = float('inf')
		req = 0
		left = 0
		for i in range(days):
			a = int(dl[i])
			w = int(worth[i])
			ans = min(ans, req + max(0, price - left + a - 1) // a)
			ns = max(0, w - left + a - 1) // a
			req += ns + 1
			left += a * ns - w
		print(ans)

def perfectsq():
	for _ in range(int(input())):
		n = input()
		for i in input().split():
			sq = math.sqrt(int(i))
			if sq != int(sq):
				print('YES')
				break
		else:
			print('NO')

def and0big():
	for _ in range(int(input())):
		(l, k) = map(int, input().split())
		print(l ** k % mod)
import math

def mod1p():
	n = int(input())
	ans = dict()
	p = 1
	for i in range(1, n):
		if math.gcd(i, n) == 1:
			ans[str(i)] = True
			p = p * i % n
	if p == 1:
		print(len(ans))
		print(' '.join(ans.keys()))
	else:
		ans.pop(str(p))
		print(len(ans))
		print(' '.join(ans.keys()))

def shorttask():
	num = 10000100
	l = [-1] * (num + 2)
	s = [-1] * (num + 2)
	l[1] = 1
	for i in range(2, int(math.sqrt(num + 1)) + 2):
		if l[i] == -1:
			l[i] = i
			for x in range(i * i, num + 1, i):
				if l[x] == -1:
					l[x] = i
	s[1] = 1
	for i in range(2, num + 1):
		if l[i] == -1:
			l[i] = i
			s[i] = i + 1
		else:
			i1 = i
			s[i] = 1
			while i1 % l[i] == 0:
				i1 //= l[i]
				s[i] = s[i] * l[i] + 1
			s[i] *= s[i1]
	ans = [-1] * (num + 1)
	for i in range(num, 0, -1):
		if s[i] < num:
			ans[s[i]] = i
	for _ in range(int(input())):
		print(ans[int(input())])

def review():
	for _ in range(int(input())):
		n = int(input())
		ans = 0
		for i in input().split():
			i = int(i)
			if i == 1 or i == 3:
				ans += 1
		print(ans)

def GCDleng():
	po10 = [0] * 11
	po10[1] = 1
	for i in range(2, 11):
		po10[i] = po10[i - 1] * 10
	for _ in range(int(input())):
		(n, n1, res) = map(int, input().split())
		print(po10[n], po10[n1] + po10[res])

def anothercarddeck():
	(n, q) = map(int, input().split())
	l = input().split()
	d = {l[i]: i for i in range(n - 1, -1, -1)}
	ans = []
	for i in input().split():
		now = d[i]
		ans.append(now + 1)
		for key in d:
			if d[key] < now:
				d[key] += 1
		d[i] = 0
	print(*ans)

def mincoststring():
	(n, letters) = map(int, input().split())
	l = [chr(i + 97) for i in range(letters)]
	ans = []
	real = letters - 1
	if not n:
		print(*ans, sep='')
		return
	if n == 1:
		print(*ans, sep='', end='')
		print(l[1 % (real + 1)])
		return
	while n:
		for i in range(len(l)):
			for i1 in range(i, len(l)):
				if i1 != real:
					ans.append(l[i1])
					ans.append(l[i])
					n -= 2
				else:
					ans.append(l[i1])
					n -= 1
				if not n:
					print(*ans, sep='')
					return
				if n == 1:
					print(*ans, sep='', end='')
					print(l[(i1 + 1) % (real + 1)])
					return
	print(*ans)

def mincost2():
	(n, letters) = map(int, input().split())
	l = [chr(i + 97) for i in range(letters)]
	comb = []
	if letters == 1 or n == 1:
		print('a' * n)
		return
	for i in range(letters):
		for i1 in range(i, letters):
			comb.append(l[i1] + l[i])
	lc = len(comb)
	while True:
		for i in range(lc):
			if ord(comb[i][0]) - 97 == letters - 1:
				n -= 1
				print(comb[i][0], end='')
			else:
				n -= 2
				print(comb[i], end='')
			if n == 1:
				pos = ord(comb[i][0]) - 97 + 1
				print(l[pos % letters])
				return
			if not n:
				return

def Tittat():
	for _ in range(int(input())):
		(n, k) = map(int, input().split())
		l = list(map(int, input().split()))
		for i in range(n):
			if not k:
				break
			while k and l[i]:
				l[i] -= 1
				l[-1] += 1
				k -= 1
		print(*l)

def xorq2():
	for _ in range(int(input())):
		n = int(input())
		s = 0
		num = -1
		nc = 0
		c = 0
		for i in input().split():
			i = int(i)
			s ^= i
			c += 1
			if num == -1 and s == i:
				num = s
				s = 0
				nc += c
				c = 0
			if num != -1 and (s == num or not s):
				s = 0
				nc += c
				c = 0
		print(['NO', 'YES'][nc == n])

def xorq2re():
	n = int(input())
	s = input().split()
	xor = 0
	for i in range(n):
		s[i] = int(s[i])
		xor ^= s[i]
	if not xor:
		print('YES')
	else:
		new = 0
		ans = 0
		for i in s:
			new ^= i
			if new == xor:
				new = 0
				ans += 1
		print(['NO', 'YES'][ans > 1])
import sys
sys.setrecursionlimit(2300)

def q3partition():

	def partition():
		if tol % 2:
			return 0
		up = tol
		rec = [[False] * (up + 2) for _ in range(n + 1)]
		rec[0][0] = True
		for i in range(1, n + 1):
			v = l[i - 1]
			for j in range(up + 1):
				if rec[i - 1][j]:
					if v + j <= up:
						rec[i][j + v] = True
					rec[i][j] = True
		return rec[n][tol // 2]

	def ints(x):
		nonlocal tol
		nonlocal gcf
		x = int(x)
		tol += x
		gcf = math.gcd(gcf, x) if gcf != float('inf') else x
		return x
	n = int(input())
	tol = 0
	gcf = float('inf')
	l = list(map(ints, input().split()))
	if partition():
		pos = 1
		for i in l:
			if i // gcf % 2:
				print(1)
				print(pos)
				return
			pos += 1
	else:
		print(0)

def main():
	q3partition()
main()


import sys, collections, bisect, random, functools
import os
from io import BytesIO, IOBase
from types import GeneratorType
sys.setrecursionlimit(100000)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = sys.stdin.readline

@functools.lru_cache(None)
def fun(i, target):
	if target == 0:
		return True
	if i == n:
		return False
	if arr[i] <= target:
		if fun(i + 1, target - arr[i]):
			return True
		if fun(i + 1, target):
			return True
		else:
			return False
	else:
		return fun(i + 1, target)

def lsb(x):
	i = 0
	while x & 1 == 0:
		x = x >> 1
		i += 1
	return i
for _ in range(1):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	s = sum(arr)
	if s % 2:
		print(0)
	elif fun(0, s // 2):
		curr = 50
		ind = -1
		for i in range(n):
			x = lsb(arr[i])
			if x == 0:
				print(1)
				print(i + 1)
				break
			elif curr > x:
				curr = x
				ind = i + 1
		else:
			print(1)
			print(ind)
	else:
		print(0)


import time

def main():
	n = i_input()
	a = li_input()
	p = [0] * n
	s = 0
	for (i, aa) in enumerate(a):
		s += aa
		c = 0
		while not aa % 2:
			aa //= 2
			c += 1
		p[i] = c
	if s % 2:
		print(0)
		return
	a.sort()
	limit = s // 2
	l = [0]
	for aa in a:
		b = []
		p1 = p2 = 0
		while p1 < len(l):
			while p2 < len(l) and l[p1] + aa >= l[p2] and (l[p2] <= limit):
				b.append(l[p2])
				p2 += 1
			if l[p1] + aa != b[-1] and l[p1] + aa <= limit:
				b.append(l[p1] + aa)
			p1 += 1
		l = b
	if l[-1] != limit:
		print(0)
		return
	minp = (100, -1)
	for i in range(n):
		minp = min(minp, (p[i], i + 1))
	print(1)
	print(minp[1])

def i_input():
	return int(input())

def l_input():
	return input().split()

def li_input():
	return list(map(int, l_input()))
TT = time.time()
main()


import math
t = int(input())
a = list(map(int, input().split()))
d = math.gcd(a[0], a[1])
for i in range(2, len(a)):
	d = math.gcd(d, a[i])
for i in range(len(a)):
	a[i] = a[i] // d
total = sum(a)
if total % 2 == 1:
	print(0)
else:
	target = total // 2
	dp = [False] * (target + 1)
	dp[0] = True
	for v in a:
		for i in range(target, v - 1, -1):
			dp[i] = dp[i] or dp[i - v]
	if dp[target]:
		j = 0
		while a[j] % 2 == 0:
			j += 1
		print(1)
		print(j + 1)
	else:
		print(0)


input()
aa = list(map(int, input().split()))
ans = []
n = len(aa)
saa = sum(aa)
if saa & 1 == 0:
	k = saa // 2
	dp = [[False] * (k + 1) for _ in range(n + 1)]
	for i in range(n + 1):
		dp[i][0] = True
	for i in range(1, n + 1):
		for cs in range(1, k + 1):
			dp[i][cs] = dp[i - 1][cs]
			if aa[i - 1] <= cs:
				dp[i][cs] |= dp[i - 1][cs - aa[i - 1]]
	if dp[n][k]:
		x = 2
		while not ans:
			for (i, a) in enumerate(aa):
				if a % x != 0:
					ans = [i]
					break
			x *= 2
print(len(ans))
if ans:
	ans[0] += 1
	print(' '.join(map(str, ans)))


import sys
input = sys.stdin.readline

def check(a, n, x, dp):
	if x == 0:
		return True
	elif n == 0:
		return False
	elif dp[n][x] != -1:
		return dp[n][x]
	else:
		dp[n][x] = check(a, n - 1, x, dp) or check(a, n - 1, x - a[n - 1], dp)
		return dp[n][x]
n = int(input())
a = list(map(int, input().split()))
x = sum(a)
if x % 2 == 1:
	print(0)
else:
	x = x // 2
	dp = [[-1 for i in range(x + 1)] for j in range(n + 1)]
	if not check(a, n, x, dp):
		print(0)
	else:
		f = 0
		ans = -1
		for i in range(n):
			if a[i] % 2 == 1:
				f = 1
				ans = i + 1
				break
		if f == 0:
			ans = -1
			while True:
				gt = 0
				for i in range(n):
					if a[i] % 2 == 1:
						ans = i + 1
						gt = 1
						break
					a[i] = a[i] // 2
					if gt == 1:
						break
				if gt == 1:
					break
		print(1)
		print(ans)


mod = 1000000007
eps = 10 ** (-9)

def main():
	import sys
	from math import gcd
	input = sys.stdin.readline
	N = int(input())
	A = list(map(int, input().split()))
	g = A[0]
	for a in A[1:]:
		g = gcd(g, a)
	B = [a // g for a in A]
	S = sum(B)
	if S & 1:
		print(0)
		exit()
	dp = [[0] * (S + 1) for _ in range(N + 1)]
	dp[0][0] = 1
	for i in range(N):
		b = B[i]
		for j in range(S + 1):
			if dp[i][j]:
				dp[i + 1][j] = 1
				if j + b <= S:
					dp[i + 1][j + b] = 1
	if dp[-1][S // 2] == 0:
		print(0)
	else:
		print(1)
		for i in range(N):
			if B[i] & 1:
				print(i + 1)
				break
main()


I = lambda : int(input())
In = lambda : list(map(int, input().split()))
import sys
from functools import lru_cache
from math import gcd
N = I()
arr = In()
x = sum(arr)
if x & 1:
	print(0)
	sys.exit()
y = x // 2

@lru_cache(None)
def dp(i, amt, y):
	if i == N:
		if amt == y:
			return True
		return False
	if arr[i] + amt <= y:
		return dp(i + 1, amt + arr[i], y) or dp(i + 1, amt, y)
	return dp(i + 1, amt, y)
res = dp(0, 0, y)
if res:
	flag = 0
	for (i, x) in enumerate(arr, 1):
		if x & 1:
			flag = 1
			print(1)
			print(i)
			break
	if flag == 0:
		print(1)
		ans = arr[0]
		for x in arr:
			ans = gcd(x, ans)
		for (i, x) in enumerate(arr, 1):
			if x // ans & 1:
				print(i)
				break
else:
	print(0)


def zip_sorted(a, b):
	(a, b) = zip(*sorted(zip(a, b)))
	sorted(zip(a, b), key=lambda x: x[1])
	return (a, b)

def number_to_list(a):
	b = []
	while a >= 1:
		c = a % 10
		a = int(a / 10)
		b.append(c)
	return list(reversed(b))

def str_list_to_int_list(a):
	a = list(map(int, a))
	return a

def make_1d_array(n, inti=0):
	a = [inti for _ in range(n)]
	return a

def make_2d_array(n, m, inti=0):
	a = [[inti for _ in range(m)] for _ in range(n)]
	return a

def make_3d_array(n, m, k, inti=0):
	a = [[[inti for _ in range(k)] for _ in range(m)] for _ in range(n)]
	return a

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)
import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
S = lambda : list(map(str, input()))
(n,) = I()
a = I()
sum1 = sum(a)
if sum1 % 2 == 0:
	sum1 = sum1 // 2
	prev = [False] * (sum1 + 1)
	prev[0] = True
	prev_a = [[] for j in range(sum1 + 1)]
	for i in range(n):
		dp = prev.copy()
		dp_a = [prev_a[j] for j in range(len(prev_a))]
		for j in range(sum1 + 1):
			if j - a[i] >= 0:
				if prev[j - a[i]]:
					if dp[j]:
						if len(dp_a[j]) > len(prev_a[j - a[i]]) + 1:
							dp_a[j] = prev_a[j - a[i]] + [i + 1]
					else:
						dp_a[j] = prev_a[j - a[i]] + [i + 1]
				dp[j] = dp[j] or prev[j - a[i]]
		prev = dp.copy()
		prev_a = [dp_a[j] for j in range(len(dp_a))]
	idx = -1
	if dp[sum1]:
		min1 = 10 ** 10
		for i in range(sum1 + 1):
			if dp[i] and (i % 2 != 0 or dp[(2 * sum1 - i) // 2] == False):
				if len(dp_a[i]) < min1:
					min1 = len(dp_a[i])
					idx = i
		print(len(dp_a[idx]))
		print(*dp_a[idx])
	else:
		print(0)
else:
	print(0)


from collections import defaultdict, OrderedDict, Counter
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
from queue import Queue, PriorityQueue
from heapq import *
from statistics import *
from math import sqrt, log10, log2, log, gcd
import fractions
import copy
from copy import deepcopy
import sys
import io
sys.setrecursionlimit(10000)
import math
import os
import bisect
import collections
mod = int(pow(10, 9)) + 7
import random
from random import *
from time import time

def ncr(n, r, p=mod):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def normalncr(n, r):
	r = min(r, n - r)
	count = 1
	for i in range(n - r, n + 1):
		count *= i
	for i in range(1, r + 1):
		count //= i
	return count
inf = float('inf')
adj = defaultdict(set)
visited = defaultdict(int)

def addedge(a, b):
	adj[a].add(b)
	adj[b].add(a)

def bfs(v):
	q = Queue()
	q.put(v)
	visited[v] = 1
	while q.qsize() > 0:
		s = q.get_nowait()
		print(s)
		for i in adj[s]:
			if visited[i] == 0:
				q.put(i)
				visited[i] = 1

def dfs(v, visited):
	if visited[v] == 1:
		return
	visited[v] = 1
	print(v)
	for i in adj[v]:
		dfs(i, visited)

def reverse_bisect_right(a, x, lo=0, hi=None):
	if lo < 0:
		raise ValueError('lo must be non-negative')
	if hi is None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if x > a[mid]:
			hi = mid
		else:
			lo = mid + 1
	return lo

def reverse_bisect_left(a, x, lo=0, hi=None):
	if lo < 0:
		raise ValueError('lo must be non-negative')
	if hi is None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if x >= a[mid]:
			hi = mid
		else:
			lo = mid + 1
	return lo

def get_list():
	return list(map(int, input().split()))

def get_str_list_in_int():
	return [int(i) for i in list(input())]

def get_str_list():
	return list(input())

def get_map():
	return map(int, input().split())

def input_int():
	return int(input())

def matrix(a, b):
	return [[0 for i in range(b)] for j in range(a)]

def swap(a, b):
	return (b, a)

def find_gcd(l):
	a = l[0]
	for i in range(len(l)):
		a = gcd(a, l[i])
	return a

def is_prime(n):
	sqrta = int(sqrt(n))
	for i in range(2, sqrta + 1):
		if n % i == 0:
			return 0
	return 1

def prime_factors(n):
	while n % 2 == 0:
		return [2] + prime_factors(n // 2)
	sqrta = int(sqrt(n))
	for i in range(3, sqrta + 1, 2):
		if n % i == 0:
			return [i] + prime_factors(n // i)
	return [n]

def p(a):
	if type(a) == str:
		print(a + '\n')
	else:
		print(str(a) + '\n')

def ps(a):
	if type(a) == str:
		print(a)
	else:
		print(str(a))

def kth_no_not_div_by_n(n, k):
	return k + (k - 1) // (n - 1)

def forward_array(l):
	n = len(l)
	stack = []
	forward = [0] * n
	for i in range(len(l) - 1, -1, -1):
		while len(stack) and l[stack[-1]] < l[i]:
			stack.pop()
		if len(stack) == 0:
			forward[i] = len(l)
		else:
			forward[i] = stack[-1]
		stack.append(i)
	return forward

def backward_array(l):
	n = len(l)
	stack = []
	backward = [0] * n
	for i in range(len(l)):
		while len(stack) and l[stack[-1]] < l[i]:
			stack.pop()
		if len(stack) == 0:
			backward[i] = -1
		else:
			backward[i] = stack[-1]
		stack.append(i)
	return backward

def char(a):
	return chr(a + 97)

def get_length(a):
	return 1 + int(log10(a))

def issq(n):
	sqrta = int(n ** 0.5)
	return sqrta ** 2 == n
nc = 'NO'
yc = 'YES'
ns = 'No'
ys = 'Yes'
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def equal_sum_partition(arr, n):
	sum = 0
	for i in range(n):
		sum += arr[i]
	if sum % 2 != 0:
		return False
	part = [[True for i in range(n + 1)] for j in range(sum // 2 + 1)]
	for i in range(0, n + 1):
		part[0][i] = True
	for i in range(1, sum // 2 + 1):
		part[i][0] = False
	for i in range(1, sum // 2 + 1):
		for j in range(1, n + 1):
			part[i][j] = part[i][j - 1]
			if i >= arr[j - 1]:
				part[i][j] = part[i][j] or part[i - arr[j - 1]][j - 1]
	return part[sum // 2][n]

def get_number(arr, n):
	for i in range(n):
		if arr[i] % 2 == 1:
			return i + 1
	binarray = [list(reversed(bin(i)[2:])) for i in arr]
	new_array = [0 for i in range(32)]
	for i in binarray:
		for j in range(len(i)):
			if i[j] == '1':
				new_array[j] += 1
	for i in range(32):
		if new_array[i] == 0:
			continue
		else:
			for j in range(len(binarray)):
				if binarray[j][i] == '1':
					return j + 1
for i in range(1):
	n = int(input())
	arr = get_list()
	if equal_sum_partition(arr, n):
		print(1)
		print(get_number(arr, n))
	else:
		print(0)


import sys
n = int(input())
array = [int(x) for x in input().split()]
if sum(array) % 2 == 0:
	s = 1
	for i in array:
		s |= s << i
	if s & 1 << sum(array) // 2:
		b = [x & -x for x in array]
		i = b.index(min(b))
		print(f'1\n{i + 1}')
		sys.exit()
print(0)


from math import gcd
from functools import reduce

def rarray():
	return [int(i) for i in input().split()]
t = 1
for ii in range(t):
	n = int(input())
	a = rarray()
	g = reduce(gcd, a)
	a = [i // g for i in a]
	s = sum(a)
	if s % 2 == 1:
		print(0)
		continue
	dp = [0] * (s // 2 + 1)
	for i in range(n):
		for j in reversed(range(a[i], s // 2 + 1)):
			dp[j] = max(dp[j], dp[j - a[i]] + a[i])
	if dp[-1] != s // 2:
		print(0)
		continue
	i = 0
	while i < n and a[i] % 2 == 0:
		i += 1
	print(1)
	print(i + 1)


from sys import stdin, stdout
input = stdin.readline

def findPartiion(arr, n):
	Sum = 0
	for i in range(n):
		Sum += arr[i]
	if Sum % 2 != 0:
		return 0
	part = [0] * (Sum // 2 + 1)
	for i in range(Sum // 2 + 1):
		part[i] = 0
	for i in range(n):
		for j in range(Sum // 2, arr[i] - 1, -1):
			if part[j - arr[i]] == 1 or j == arr[i]:
				part[j] = 1
	return part[Sum // 2]
t = 1
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	if sum(a) % 2:
		print(0)
		continue
	if not findPartiion(a, n):
		print(0)
		continue
	l = 0
	r = n - 1
	while l <= r:
		vals = a[:]
		i = l
		del vals[i]
		if not findPartiion(vals, n - 1):
			print(1)
			print(i + 1)
			break
		vals = a[:]
		i = r
		del vals[i]
		if not findPartiion(vals, n - 1):
			print(1)
			print(i + 1)
			break
		l += 1
		r -= 1
	else:
		assert 1 == 2


def findsubarr(s, n, e):
	if n == 1:
		return {0, e}
	else:
		p = list(findsubarr(s, n - 1, a[n - 2]))
		q = set()
		for x in range(len(p)):
			sum1 = p[x] + 0
			sum2 = p[x] + e
			if sum1 <= s:
				q.add(sum1)
			if sum2 <= s:
				q.add(sum2)
		return q
n = int(input())
a = list(map(int, input().split()))
q = min(a)
s = sum(a)
p = 1
if s % 2 == 0:
	if (s / 2 in findsubarr(int(s / 2), n, a[n - 1])) == False:
		print(0)
		exit()
while True:
	t = pow(2, p)
	if s % t != 0:
		print(0)
		exit()
	else:
		for x in range(n):
			if a[x] % t != 0:
				print(1)
				print(x + 1)
				exit()
		p = p + 1


import os
import sys
from io import BytesIO, IOBase
import threading
from bisect import bisect_right
from math import gcd, log
from collections import Counter, defaultdict, deque
from pprint import pprint
from itertools import permutations
from bisect import bisect_right
from random import randint as rti

def is_pos(arr):
	n = len(arr)
	total = sum(arr)
	if total % 2:
		return False
	MX = total // 2 + 1
	pos = [0] * MX
	pos[0] = 1
	for i in range(n):
		for j in range(MX - 1 - arr[i], -1, -1):
			pos[j + arr[i]] |= pos[j]
		if pos[MX - 1]:
			return True
	return False
MOD = 10 ** 9 + 7

def main():
	n = int(input())
	arr = list(map(int, input().split()))
	total = sum(arr)
	if total % 2 or not is_pos(arr):
		print(0)
		return
	for i in range(n):
		brr = arr[:i] + arr[i + 1:]
		if not is_pos(brr):
			print(1)
			print(i + 1)
			return
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(1):
	main()


from functools import lru_cache

@lru_cache(None)
def solve(i, temp_s, tar):
	if temp_s == tar:
		return True
	if i < 0 or temp_s > tar:
		return False
	if temp_s + list1[i] > tar:
		return solve(i - 1, temp_s, tar)
	else:
		return solve(i - 1, temp_s, tar) or solve(i - 1, temp_s + list1[i], tar)
n = int(input())
list1 = list(map(int, input().split()))
sum1 = sum(list1)
if sum1 % 2 == 1:
	print(0)
else:
	f = 0
	idx = -1
	if solve(n - 1, 0, sum1 // 2):
		while 1:
			for i in range(len(list1)):
				if list1[i] % 2 == 1:
					idx = i + 1
					f = 1
					break
				else:
					list1[i] = list1[i] // 2
			if f == 1:
				break
		print(1)
		print(idx)
	else:
		print(0)


import sys, os, io
import math, bisect, operator
(inf, mod) = (float('inf'), 10 ** 9 + 7)
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, defaultdict
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
Neo = lambda : list(map(int, input().split()))
(n,) = Neo()
A = Neo()

def isSubsetSum(set, n, sum):
	subset = [[False for i in range(sum + 1)] for i in range(n + 1)]
	for i in range(n + 1):
		subset[i][0] = True
	for i in range(1, sum + 1):
		subset[0][i] = False
	for i in range(1, n + 1):
		for j in range(1, sum + 1):
			if j < set[i - 1]:
				subset[i][j] = subset[i - 1][j]
			if j >= set[i - 1]:
				subset[i][j] = subset[i - 1][j] or subset[i - 1][j - set[i - 1]]
	return subset[n][sum]
if not isSubsetSum(A, n, sum(A) // 2) or sum(A) % 2:
	print(0)
else:
	print(1)
	while True:
		f = 0
		for i in range(n):
			if A[i] % 2:
				f = 1
				print(i + 1)
				break
			else:
				A[i] //= 2
		if f:
			break


import sys
import math
from math import factorial, inf, gcd
from heapq import *
from functools import *
from itertools import *
from collections import *
from typing import *
from bisect import *
import random
sys.setrecursionlimit(10 ** 5)

def rarray():
	return [int(i) for i in input().split()]
t = 1
for ii in range(t):
	n = int(input())
	a = rarray()
	s = sum(a)
	if s % 2 == 1:
		print(0)
		continue
	dp = [0] * (s // 2 + 1)
	for i in range(n):
		for j in reversed(range(a[i], s // 2 + 1)):
			dp[j] = max(dp[j], dp[j - a[i]] + a[i])
	if dp[-1] != s // 2:
		print(0)
		continue
	i = 0
	while i < n and a[i] % 2 == 0:
		i += 1
	if i != n:
		print(1)
		print(i + 1)
	else:
		k = 2
		while k <= s:
			i = 0
			while i < n and a[i] // k % 2 == 0:
				i += 1
			if i != n:
				print(1)
				print(i + 1)
				break
			k *= 2


def bad(v):
	global n
	s = 0
	for i in v:
		s += i
	if s % 2 != 0:
		return 0
	b = 2 ** 200005
	for i in v:
		b |= b >> i
	r = b // 2 ** (200005 - s // 2) % 2
	return r
pw = [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]
n = int(input())
m = [int(i) for i in input().split()]
if bad(m):
	mj = len(pw)
	for i in range(len(m)):
		if m[i] % 2 != 0:
			t = i + 1
			break
		for j in range(mj):
			if m[i] % pw[j] != 0:
				if mj > j:
					mj = j
					t = i + 1
	print(1, t, sep='\n')
else:
	print(0)


n = int(input())
(*arr,) = map(int, input().split())
while all((v % 2 == 0 for v in arr)):
	arr = [v // 2 for v in arr]
s = sum(arr)
inf = n + 1
dp = [inf] * (sum(arr) + 1)
dp[0] = 0
for v in arr:
	for i in range(len(dp) - 1, -1, -1):
		if dp[i] != inf:
			dp[i + v] = min(dp[i] + 1, dp[i + v])

def f():
	if s % 2 or dp[s // 2] == inf:
		return []
	else:
		found = -1
		for (i, v) in enumerate(arr):
			if v % 2:
				found = i
				break
		assert found != -1
		return [found]
ans = f()
print(len(ans))
print(*[v + 1 for v in ans])


n = int(input())
a = [int(i) for i in input().split()]
sm = sum(a)
if sm % 2 == 1:
	print(0)
else:
	target = sm // 2
	dp = [[0 for j in range(target + 1)] for i in range(n + 1)]
	dp[0][0] = 1
	x = []
	c = {0: []}
	boo = True
	for i in range(1, n + 1):
		for j in range(target):
			if dp[i - 1][j]:
				dp[i][j] = 1
				if j + a[i - 1] <= target:
					dp[i][j + a[i - 1]] = 1
	if not dp[-1][-1]:
		print(0)
		exit()
	while boo:
		for i in range(n):
			if a[i] % 2:
				print(1)
				print(i + 1)
				exit()
			a[i] /= 2


n = int(input())
l = list(map(int, input().split()))
(idx, min_cnt) = (0, 1 << 30)
s = sum(l)
if s % 2:
	print(0)
else:
	dp = [0] * (s // 2 + 1)
	for i in range(n):
		for j in range(s // 2, l[i] - 1, -1):
			if dp[j - l[i]] or j == l[i]:
				dp[j] = 1
	for i in range(n):
		cnt = 0
		while l[i] % 2 == 0:
			cnt += 1
			l[i] //= 2
		if cnt < min_cnt:
			min_cnt = cnt
			idx = i + 1
	if dp[-1]:
		print(1)
		print(idx)
	else:
		print(0)


import math

def calc(arr):
	gc = arr[0]
	for i in range(1, len(arr)):
		gc = math.gcd(gc, arr[i])
	return gc

def check(arr):
	n = sum(arr) // 2
	dp = [0 for i in range(sum(arr) + 4)]
	dp[0] = 1
	for i in arr:
		for j in range(len(dp) - 1, -1, -1):
			if dp[j] == 1:
				dp[i + j] = 1
				if i + j == n:
					return True
	if dp[n] == 1:
		return True
	return False
n = int(input())
arr = list(map(int, input().split()))
gc = calc(arr)
if sum(arr) % 2 == 0:
	if check(arr) == False:
		print(0)
	else:
		flag = 0
		for i in range(n):
			if arr[i] % 2 == 1:
				print(1)
				print(i + 1)
				flag = 1
				break
		if flag == 0:
			for i in range(n):
				if arr[i] // gc % 2 == 1:
					print(1)
					print(i + 1)
					break
else:
	print(0)


import sys
import re
import random
import math
import copy
from heapq import heappush, heappop, heapify
from functools import cmp_to_key
from bisect import bisect_left, bisect_right
from collections import defaultdict, deque, Counter
input = sys.stdin.readline
getS = lambda : input().strip()
getN = lambda : int(input())
getList = lambda : list(map(int, input().split()))
getZList = lambda : [int(x) - 1 for x in input().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
divide = lambda x: pow(x, MOD - 2, MOD)

def nck(n, k, kaijyo):
	return npk(n, k, kaijyo) * divide(kaijyo[k]) % MOD

def npk(n, k, kaijyo):
	if k == 0 or k == n:
		return n % MOD
	return kaijyo[n] * divide(kaijyo[n - k]) % MOD

def fact_and_inv(SIZE):
	inv = [0] * SIZE
	fac = [0] * SIZE
	finv = [0] * SIZE
	inv[1] = 1
	fac[0] = fac[1] = 1
	finv[0] = finv[1] = 1
	for i in range(2, SIZE):
		inv[i] = MOD - MOD // i * inv[MOD % i] % MOD
		fac[i] = fac[i - 1] * i % MOD
		finv[i] = finv[i - 1] * inv[i] % MOD
	return (fac, finv)

def renritsu(A, Y):
	A = np.matrix(A)
	Y = np.matrix(Y)
	Y = np.reshape(Y, (-1, 1))
	X = np.linalg.solve(A, Y)
	return X.flatten().tolist()[0]

class TwoDimGrid:

	def __init__(self, h, w, wall='#'):
		self.h = h
		self.w = w
		self.size = (h + 2) * (w + 2)
		self.wall = wall
		self.get_grid()

	def get_grid(self):
		grid = [self.wall * (self.w + 2)]
		for i in range(self.h):
			grid.append(self.wall + getS() + self.wall)
		grid.append(self.wall * (self.w + 2))
		self.grid = grid

	def init_cost(self):
		self.cost = [INF] * self.size

	def pos(self, x, y):
		return y * (self.w + 2) + x

	def getgrid(self, x, y):
		return self.grid[y][x]

	def get(self, x, y):
		return self.cost[self.pos(x, y)]

	def set(self, x, y, v):
		self.cost[self.pos(x, y)] = v
		return

	def show(self):
		for i in range(self.h + 2):
			print(self.cost[(self.w + 2) * i:(self.w + 2) * (i + 1)])

	def showsome(self, tgt):
		for t in tgt:
			print(t)
		return

	def showsomejoin(self, tgt):
		for t in tgt:
			print(''.join(t))
		return

	def search(self):
		grid = self.grid
		move = [(0, 1), (0, -1), (1, 0), (-1, 0)]
		move_eight = [(0, 1), (0, -1), (1, 0), (-1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]

class BIT:

	def __init__(self, n):
		self.n = n
		self.BIT = [0] * (n + 2)

	def query(self, idx):
		res_sum = 0
		while idx > 0:
			res_sum += self.BIT[idx]
			idx -= idx & -idx
		return res_sum

	def update(self, idx, x):
		while idx <= self.n:
			self.BIT[idx] += x
			idx += idx & -idx
		return

	def show(self):
		print(self.BIT)

def dp(li):
	k = defaultdict(int)
	k[0] = 0
	for l in li:
		tk = defaultdict(int)
		for kk in k.keys():
			tk[kk] = 1
			tk[kk + l] = 1
		k = tk
	return k

def solve():
	n = getN()
	li = getList()
	dd = dp(li)
	sm = sum(li)
	if sm % 2 == 1 or dd[sm // 2] == 0:
		print(0)
		return
	base = 1
	while True:
		sm = sum(li)
		if sm % 2 == 1:
			print(0)
			return
		for (x, i) in enumerate(li):
			if i % 2 == 1:
				print(1)
				print(x + 1)
				return
		base <<= 1
		li = [l // 2 for l in li]

def ran():
	n = random.randint(1, 10)
	li = [random.choice([i for i in range(100)]) for j in range(n)]
	return (n, li)

def main():
	n = getN()
	for _ in range(n):
		solve()
	return
solve()


def partition(arr):
	n = len(arr)
	k = sum(arr)
	m = k // 2
	p = [[False] * (n + 1) for i in range(m + 1)]
	p[0] = [True] * (n + 1)
	for i in range(1, m + 1):
		for j in range(1, n + 1):
			x = arr[j - 1]
			if i - x >= 0:
				p[i][j] = p[i][j - 1] or p[i - x][j - 1]
			else:
				p[i][j] = p[i][j - 1]
	return p[m][n]
n = int(input())
a = [int(x) for x in input().split()]
while all((x % 2 == 0 for x in a)):
	a = [x // 2 for x in a]
k = sum(a)
if k % 2 == 1:
	result = 0
elif not partition(a):
	result = 0
else:
	result = 1
	for i in range(n):
		if a[i] % 2 == 1:
			break
print(result)
if result == 1:
	print(i + 1)


import os, sys, math
from io import BytesIO, IOBase
from collections import defaultdict, deque, OrderedDict
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')

def I():
	return int(input())

def In():
	return map(int, input().split())

def ln():
	return list(map(int, input().split()))

def Sn():
	return input().strip()
from array import array
BUFSIZE = 8192

def find_gt(a, x):
	i = bi.bisect_left(a, x)
	if i != len(a):
		return i
	else:
		return len(a)

def CountTrailingZeros(n):
	bit = bin(n)[2:]
	bit = bit[::-1]
	zero = 0
	for i in range(len(bit)):
		if bit[i] == '0':
			zero += 1
		else:
			break
	return zero

def solve():
	Max = 2000 * 100
	n = I()
	dp = array('b')
	dp = [False] * Max
	dp[0] = True
	l = list(In())
	total = 0
	for x in l:
		total += x
		for j in range(len(dp) - x - 1, -1, -1):
			if not dp[j]:
				continue
			dp[j + x] = True
	if not dp[total // 2] or total % 2 != 0:
		print(0)
		return
	trail = 31
	for x in l:
		trail = min(trail, CountTrailingZeros(x))
	ans = -2
	for i in range(n):
		if l[i] % (1 << trail + 1) != 0:
			ans = i
	print(1)
	print(ans + 1)
	pass

def main():
	T = 1
	for i in range(T):
		solve()
M = 998244353
P = 1000000007

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s.rstrip())

def invr():
	return map(int, input().split())

def solution(L):
	for i in range(n):
		l = L[i]
		if l % 2 == 1:
			print(1)
			print(i + 1)
			return 0
	solution([l // 2 for l in L])
n = inp()
L = inlt()
S = sum(L)

def test():
	if S % 2 != 0:
		print(0)
	else:
		P = set([0])
		found = False
		for l in L:
			if found:
				break
			A = []
			for p in P:
				if p + l == S // 2:
					found = True
					break
				if p + l <= S // 2:
					A.append(p + l)
			for a in A:
				P.add(a)
		if found:
			solution(L)
		else:
			print(0)
test()


def check(arr):
	n = sum(arr) // 2
	dp = [0 for i in range(sum(arr) + 4)]
	dp[0] = 1
	for i in arr:
		for j in range(len(dp) - 1, -1, -1):
			if dp[j] == 1:
				dp[i + j] = 1
				if i + j == n:
					return True
	if dp[n] == 1:
		return True
	return False

def answer(arr):
	if sum(arr) % 2 != 0:
		print(0)
	else:
		import math
		n = sum(arr) // 2
		dp = [0 for i in range(n + 1)]
		if check(arr) == True:
			d = math.gcd(arr[0], arr[1])
			for i in range(2, len(arr)):
				d = math.gcd(d, arr[i])
			for i in range(len(arr)):
				arr[i] //= d
			j = 0
			while j < len(arr):
				if arr[j] % 2 != 0:
					break
				j += 1
			print(1)
			if j < len(arr):
				print(j + 1)
			else:
				print(j)
		else:
			print(0)
n = int(input())
inp = input().split()
arr = []
for i in inp:
	arr.append(int(i))
answer(arr)


from sys import stdin, stdout, setrecursionlimit
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log, log2
from random import seed, randint
from datetime import datetime
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
from collections import defaultdict as dd
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def iinp():
	return int(inp())

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def smp():
	return map(str, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(m, val) for j in range(n)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b

def def_value():
	return 0

def def_inf():
	return inf

def atoi(s):
	return ord(s) - ord('a')

def inc(s, n=1):
	return chr((ord(s) - ord('a') + n) % 26 + ord('a'))

class XY:

	def __init__(self, x, y):
		self.x = x
		self.y = y

def rotate(a, b, c):
	ang = (b.y - a.y) * (c.x - b.x) - (b.x - a.x) * (c.y - b.y)
	if ang == 0:
		return 0
	else:
		return ang / abs(ang)
n = iinp()
b = lmp()
a = b.copy()
s = sum(a)
if s % 2 != 0:
	print(0)
else:
	s //= 2
	dp = l1d(s + 1, False)
	dp[0] = True
	for i in range(n):
		for j in range(s, -1, -1):
			if j - a[i] >= 0:
				dp[j] = dp[j - a[i]] or dp[j]
	if not dp[s]:
		print(0)
	else:
		flg = False
		for i in range(n):
			if a[i] % 2 == 1:
				print(1)
				print(i + 1)
				flg = True
				break
		if not flg:
			print(1)
			gd = 0
			for i in range(n):
				gd = gcd(a[i], gd)
			for i in range(n):
				if a[i] / gd % 2 == 1:
					print(i + 1)
					break


from collections import defaultdict, deque, Counter
from heapq import heapify, heappop, heappush
import math
from copy import deepcopy
from itertools import combinations, permutations, product, combinations_with_replacement
from bisect import bisect_left, bisect_right
import sys

def input():
	return sys.stdin.readline().rstrip()

def getN():
	return int(input())

def getNM():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def getArray(intn):
	return [int(input()) for i in range(intn)]
mod = 10 ** 9 + 7
MOD = 998244353
INF = float('inf')
eps = 10 ** (-10)
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]
N = getN()
A = getList()
while all([a % 2 == 0 for a in A]):
	A = [a // 2 for a in A]
if sum(A) % 2 != 0:
	print(0)
	exit()
prev = [0] * 200007
prev[0] = 1
for i in range(N):
	next = [0] * 200007
	for j in range(200007):
		next[j] += prev[j]
		if j + A[i] < 200007:
			next[j + A[i]] += prev[j]
	prev = next
if prev[sum(A) // 2] == 0:
	print(0)
else:
	for i in range(N):
		if A[i] % 2 != 0:
			print(1)
			print(i + 1)
			exit()


from sys import stdin, stdout
get_string = lambda : stdin.readline().strip(' ')
get_intmap = lambda : map(int, get_string().split(' '))

def testcase():
	n = int(input())
	l = list(get_intmap())
	suml = sum(l)
	if suml % 2 == 1:
		print(0)
		return
	dp = 1
	for i in l:
		dp |= dp << i
	if dp & 1 << suml // 2:
		print(1)
		min_lsb_pos = 32
		min_ind = -1
		for (ind, i) in enumerate(l):
			lsb_pos = 0
			while i & 1 << lsb_pos == 0:
				lsb_pos += 1
			if min_lsb_pos > lsb_pos:
				min_lsb_pos = lsb_pos
				min_ind = ind
		print(min_ind + 1)
	else:
		print(0)
testcase()
quit()
for t in range(int(input())):
	testcase()


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
from heapq import heappush, heappop, heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10 ** 9 + 7
inf = float('inf')

def I():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))
n = I()
a = LI()
s = sum(a)
m = max(a)
if s % 2:
	print(0)
else:
	dp = [[False] * (n * m + 1) for _ in range(n + 1)]
	dp[0][0] = True
	for i in range(n):
		ai = a[i]
		for j in range(n * m + 1):
			dp[i + 1][j] = dp[i][j]
		for j in range(n * m + 1 - ai):
			if dp[i][j] and (not dp[i + 1][j + ai]):
				dp[i + 1][j + ai] = True
	if dp[n][s // 2]:
		for i in range(n):
			if a[i] % 2:
				print(1)
				print(i + 1)
				break
		else:
			for _ in range(n - 1):
				g = a[0]
				for i in range(1, n):
					g = math.gcd(g, a[i])
				for i in range(len(a)):
					a[i] //= g
					if a[i] % 2:
						print(1)
						print(i + 1)
						break
				else:
					continue
				break
	else:
		print(0)


import math
import sys
import collections
import bisect
import time
import random
from itertools import permutations

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_string():
	return sys.stdin.readline().strip()

def findPartition(arr, n):
	Sum = 0
	for i in range(n):
		Sum += arr[i]
	if Sum % 2 != 0:
		return 0
	part = [0] * (Sum // 2 + 1)
	for i in range(Sum // 2 + 1):
		part[i] = 0
	for i in range(n):
		for j in range(Sum // 2, arr[i] - 1, -1):
			if part[j - arr[i]] == 1 or j == arr[i]:
				part[j] = 1
	return part[Sum // 2]
for t in range(1):
	n = int(input())
	arr = get_list()
	if findPartition(arr, n) == False:
		print(0)
		continue
	p = 0
	for i in range(n):
		if arr[i] % 2 == 1:
			print(1)
			print(i + 1)
			p += 1
			break
	if p > 0:
		continue
	power_of_2 = 100
	pos = 0
	for i in range(n):
		ele = arr[i]
		c = 0
		while ele % 2 == 0:
			ele //= 2
			c += 1
		if c < power_of_2:
			pos = i + 1
			power_of_2 = c
	print(1)
	print(pos)


def can1timsum(nums, i, val, memo={}):
	if val in memo:
		print(i, val, 'in memo')
		return memo[val]
	if val == 0:
		return True
	if val < 0 or i < 0:
		return False
	result = can1timsum(nums, i - 1, val - nums[i], memo) or can1timsum(nums, i - 1, val, memo)
	memo[val] = result
	return result

def cansum(nums, i, val, memo={}, numeros=[]):
	if val in memo:
		(posible, i2) = memo[val]
		if posible:
			if i2 < i:
				print('actualiza', i, end='')
				memo[val] = (True, i2)
			return True
		if i2 >= i:
			return False
	if val == 0:
		return True
	if val < 0 or i < 0:
		return False
	result = cansum(nums, i - 1, val - nums[i], memo, []) or cansum(nums, i - 1, val, memo, [])
	memo[val] = (result, i)
	return result

def solvecaso():
	n = int(input())
	nums = list(map(int, input().split()))
	nones = 0
	while True:
		for num in nums:
			if num % 2 == 1:
				nones += 1
		if nones != 0:
			break
		for i in range(n):
			nums[i] //= 2
	suma = 0
	for num in nums:
		suma += num
	if suma % 2 == 1:
		return '0'
	if not cansum(nums, n - 1, suma // 2, {}):
		return '0'
	index = 0
	for num in nums:
		if num % 2 == 1:
			break
		index += 1
	return f'1\n{index + 1}'
print(solvecaso())


from math import gcd
a = []

def get_sum(s, n):
	global a
	ss = [[0 for _ in range(s + 1)] for j in range(n + 1)]
	for i in range(n + 1):
		ss[i][0] = 1
	for i in range(1, n + 1):
		for j in range(1, s + 1):
			if j < a[i - 1]:
				ss[i][j] = ss[i - 1][j]
			if j >= a[i - 1]:
				ss[i][j] = ss[i - 1][j] | ss[i - 1][j - a[i - 1]]
	return ss[n][s]

def abe():
	global a
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) % 2 == 1:
		print(0)
		return
	if get_sum(sum(a) // 2, n) == 0:
		print(0)
		return
	if len(a) == 2 and a[0] != a[1]:
		print(0)
		return
	x = a[0]
	for i in a:
		x = gcd(x, i)
	for i in range(n):
		a[i] = a[i] // x
	if sum(a) % 2 == 1:
		print(0)
		return
	print(1)
	for i in range(n):
		if a[i] % 2 == 1:
			print(i + 1)
			return
for _ in range(1):
	abe()


import sys
input = sys.stdin.readline
n = int(input())
A = list(map(int, input().split()))
SUM = sum(A)
DP = {0}
for a in A:
	NDP = set()
	for d in DP:
		NDP.add(a + d)
	DP |= NDP
if SUM % 2 == 1 or not SUM // 2 in DP:
	print(0)
	exit()
TWO = [0] * n
for i in range(n):
	count = 0
	while A[i] % 2 == 0:
		count += 1
		A[i] //= 2
	TWO[i] = count
MIN = min(TWO)
x = TWO.index(MIN)
print(1)
print(x + 1)


import sys
import math
from bisect import bisect_left
import heapq
from collections import deque
from functools import reduce

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()

def FACT(n, mod):
	s = 1
	facts = [1]
	for i in range(1, n + 1):
		s *= i
		s %= mod
		facts.append(s)
	return facts[n]

def C(n, k, mod):
	return FACT(n, mod) * pow(FACT(k, mod) * FACT(n - k, mod) % mod, mod - 2, mod) % mod

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def canPartition(A):
	a = reduce(lambda a, num: a | a << num, A, 1)
	return sum(A) % 2 == 0 and a & 1 << sum(A) // 2 != 0
mod = 10 ** 9 + 7
n = II()
a = LI()
s = sum(a)
ans = []
if s % 2 == 0 and canPartition(a):
	while len(ans) == 0:
		for i in range(n):
			if a[i] % 2 == 1:
				ans.append(i + 1)
				break
			else:
				a[i] //= 2
print(len(ans))
print(*ans)


import sys
n = int(input())
a = [int(x) for x in input().split()]
z = sum(a)
if z % 2:
	print(0)
	sys.exit()
s = set([0])
for x in a:
	s.update([t + x for t in s])
if z // 2 not in s:
	print(0)
	sys.exit()
b = [x & -x for x in a]
i = b.index(min(b))
print(f'1\n{i + 1}')


from functools import reduce

def canPartition(nums):
	(target, r) = divmod(sum(nums), 2)
	return r == 0 and reduce(lambda x, y: x << y | x, [1] + nums) >> target & 1
n = int(input())
arr = [int(x) for x in input().split()]
res = []
while canPartition(arr):
	tmp = []
	tarr = arr
	for i in range(n):
		t = arr[:i] + arr[i + 1:]
		if not canPartition(t):
			tmp.append(i)
	m = min(tmp)
	arr = arr[:m] + arr[m + 1:]
	res.append(m)
if len(res) > 0:
	print(len(res))
	print(' '.join((str(x + 1) for x in res)))
else:
	print('0')


N = int(input())
A = list(map(int, input().split()))
S = sum(A)
if S % 2:
	print(0)
	exit()
val = S // 2
num = [False] * 200001
num[0] = True
for i in A:
	tmp = num[:]
	for j in range(200001):
		if tmp[j]:
			if j + i <= 200000:
				num[i + j] = True
if not num[val]:
	print(0)
	exit()
while True:
	odd = []
	even = []
	for i in A:
		if i % 2:
			odd.append(i)
		else:
			even.append(i)
	if not odd:
		for i in range(N):
			A[i] = A[i] // 2
		S = sum(A)
		continue
	elif odd:
		print(1)
		print(A.index(odd[0]) + 1)
		exit()


from functools import lru_cache

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

@lru_cache(None)
def subsetSum(curSum, totalSum, idx, array):
	if idx >= len(array):
		return False
	if totalSum == 2 * curSum:
		return True
	if 2 * curSum > totalSum:
		return False
	withVal = subsetSum(curSum + array[idx], totalSum, idx + 1, array)
	if withVal:
		return True
	withOutVal = subsetSum(curSum, totalSum, idx + 1, array)
	return withOutVal
n = int(input())
array = tuple(map(int, input().split()))
totalSum = sum(array)
if totalSum % 2 != 0 or not subsetSum(0, totalSum, 0, array):
	print(0)
else:
	for (idx, val) in enumerate(array):
		if val % 2 != 0:
			print(1)
			print(idx + 1)
			break
	else:
		ansIdx = 0
		ansCount = float('inf')
		for (idx, val) in enumerate(array):
			count = 0
			while val % 2 == 0:
				count += 1
				val = val / 2
			if count < ansCount:
				ansCount = count
				ansIdx = idx
		print(1)
		print(ansIdx + 1)


from collections import defaultdict

def findPartiion(arr, n):
	Sum = 0
	for i in range(n):
		Sum += arr[i]
	if Sum % 2 != 0:
		return 0
	part = [0] * (Sum // 2 + 1)
	for i in range(Sum // 2 + 1):
		part[i] = 0
	for i in range(n):
		for j in range(Sum // 2, arr[i] - 1, -1):
			if part[j - arr[i]] == 1 or j == arr[i]:
				part[j] = 1
	return part[Sum // 2]
n = int(input())
a = list(map(int, input().split()))
if not findPartiion(a, n):
	print(0)
else:
	for i in range(n):
		idx = i
		k = a[i]
		a[i] = 0
		if not findPartiion(a, n):
			print(1)
			print(i + 1)
			break
		a[i] = k


from sys import stdin, stdout
from collections import defaultdict as dd
from collections import deque
import math
input = stdin.readline
flush = stdout.flush

def f(set, n, sum):
	subset = [[False for i in range(sum + 1)] for i in range(n + 1)]
	for i in range(n + 1):
		subset[i][0] = True
	for i in range(1, sum + 1):
		subset[0][i] = False
	for i in range(1, n + 1):
		for j in range(1, sum + 1):
			if j < set[i - 1]:
				subset[i][j] = subset[i - 1][j]
			if j >= set[i - 1]:
				subset[i][j] = subset[i - 1][j] or subset[i - 1][j - set[i - 1]]
	return subset[n][sum]
tc = 1
for _ in range(tc):
	n = int(input())
	a = list(map(int, input().split()))
	x = sum(a)
	if x % 2 == 1:
		print(0)
		continue
	if f(a, len(a), x // 2) == 0:
		print(0)
		continue
	x = 2
	y = 1
	print(1)
	b = 0
	while True:
		for i in range(n):
			if a[i] % x == y:
				print(i + 1)
				b = 1
				break
		if b == 1:
			break
		x = x << 1
		y = y << 1


import os.path
from math import gcd, floor, ceil
from collections import *
import sys
mod = 1000000007
INF = float('inf')

def st():
	return list(sys.stdin.readline().strip())

def li():
	return list(map(int, sys.stdin.readline().split()))

def mp():
	return map(int, sys.stdin.readline().split())

def inp():
	return int(sys.stdin.readline())

def pr(n):
	return sys.stdout.write(str(n) + '\n')

def prl(n):
	return sys.stdout.write(str(n) + ' ')
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def solve():

	def candivide(l):
		s = sum(l)
		if s % 2:
			return False
		s = s // 2
		dp = [0 for i in range(s + 1)]
		dp[0] = 1
		for i in l:
			for j in range(s, i - 1, -1):
				dp[j] |= dp[j - i]
		return dp[-1]
	n = inp()
	l = li()
	if not candivide(l):
		pr(0)
		return
	ind = -1
	for i in range(n):
		if l[i] % 2:
			ind = i + 1
			break
	if ind != -1:
		pr(1)
		pr(ind)
		return
	f = 1
	for i in range(n):
		x = []
		for j in range(n):
			if i != j:
				x.append(l[j])
		if not candivide(x):
			pr(1)
			pr(i + 1)
			return
solve()


import random
import collections
import string
import math
import copy
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
mo = 998244353

def exgcd(a, b):
	if not b:
		return (1, 0)
	(y, x) = exgcd(b, a % b)
	y -= a // b * x
	return (x, y)

def getinv(a, m):
	(x, y) = exgcd(a, m)
	return -1 if x == 1 else x % m

def comb(n, b):
	res = 1
	b = min(b, n - b)
	for i in range(b):
		res = res * (n - i) * getinv(i + 1, mo) % mo
	return res % mo

def quickpower(a, n):
	res = 1
	while n:
		if n & 1:
			res = res * a % mo
		n >>= 1
		a = a * a % mo
	return res

def dis(a, b):
	return abs(a[0] - b[0]) + abs(a[1] - b[1])

def getpref(x):
	if x > 1:
		return x * (x - 1) >> 1
	else:
		return 0

def orafli(upp):
	primes = []
	marked = [False for i in range(upp + 3)]
	prvs = [i for i in range(upp + 3)]
	for i in range(2, upp):
		if not marked[i]:
			primes.append(i)
		for j in primes:
			if i * j >= upp:
				break
			marked[i * j] = True
			prvs[i * j] = j
			if i % j == 0:
				break
	return (primes, prvs)

def lower_ord(c: str) -> int:
	return ord(c) - 97

def upper_ord(c: str) -> int:
	return ord(c) - 65

def read_list():
	return [int(i) for i in input().split()]

def read_int():
	s = input().split()
	if len(s) == 1:
		return int(s[0])
	else:
		return map(int, s)

def ask(s):
	print(f'? {s}', flush=True)

def answer(s):
	print(f'{s}', flush=True)
import functools

def solve():
	n = read_int()
	l = read_list()
	summ = sum(l)
	if summ & 1:
		print(0)
		return
	vis = [0 for i in range(200010)]
	vis[0] = 1
	for i in range(n):
		for j in range(200001, -1, -1):
			if vis[j]:
				vis[l[i] + j] = 1
	if vis[summ >> 1] != 1:
		print(0)
		return
	d = []
	while True:
		su = sum(l)
		flg = True
		if summ % 2 == 1:
			break
		else:
			for (p, i) in enumerate(l):
				if i & 1:
					d.append(p + 1)
					flg = False
					break
		if not flg:
			break
		for (p, i) in enumerate(l):
			l[p] >>= 1
	print(len(d))
	print(*d)
t = 1
for ti in range(t):
	solve()


from sys import stdin

def read_int():
	return int(stdin.readline())

def read_ints():
	return map(int, stdin.readline().split(' '))
n = read_int()
a = list(read_ints())
s = sum(a)
if s % 2 == 1:
	print(0)
	exit(0)
dp = [False] * (s // 2 + 1)
dp[0] = True
for ai in a:
	for j in range(s // 2, ai - 1, -1):
		dp[j] = dp[j] or dp[j - ai]
if not dp[s // 2]:
	print(0)
	exit(0)
while True:
	if sum(a) % 2 == 1:
		print(0)
		exit(0)
	else:
		odd = -1
		for i in range(n):
			if a[i] % 2 == 1:
				print(1)
				print(i + 1)
				exit(0)
		a = [x // 2 for x in a]


import sys
import sys

def findMin(S, n):
	total = sum(S)
	T = [[False] * (total + 1) for _ in range(len(S) + 1)]
	for i in range(len(S) + 1):
		T[i][0] = True
		j = 1
		while i > 0 and j <= total:
			T[i][j] = T[i - 1][j]
			if S[i - 1] <= j:
				T[i][j] |= T[i - 1][j - S[i - 1]]
			j = j + 1
	j = total // 2
	while j >= 0 and (not T[len(S)][j]):
		j = j - 1
	return total - 2 * j
n = int(input())
a = list(map(int, input().split()))
cou = 1
c = a[0]
for i in range(1, n):
	if a[i] == c:
		cou += 1
if sum(a) % 2 != 0:
	print(0)
elif cou == n:
	if cou % 2 == 0:
		print(1)
		print(1)
	else:
		print(0)
elif findMin(a, n) > 0:
	print(0)
else:
	min = 10000
	ans = -1
	for i in range(n):
		num = a[i]
		count = 0
		while num % 2 == 0:
			num = num // 2
			count += 1
		if count < min:
			min = count
			ans = i
	print(1)
	print(ans + 1)


def putin():
	return map(int, input().split())

def ord(n):
	answer = 0
	while n % 2 == 0:
		n //= 2
		answer += 1
	return answer

def check_knapsack(A):
	S = sum(A) // 2
	st = {0}
	for elem in A:
		for el in st.copy():
			if el + elem < S:
				st.add(el + elem)
			if el + elem == S:
				return True
	return False

def sol():
	n = int(input())
	A = list(putin())
	S = sum(A)
	mn = float('inf')
	mn = ord(A[0])
	mn_ind = 0
	for i in range(len(A)):
		if ord(A[i]) < mn:
			mn = ord(A[i])
			mn_ind = i
	S //= 2 ** mn
	if S % 2 == 0 and check_knapsack(A):
		print(1, mn_ind + 1, sep='\n')
	else:
		print(0)
sol()


N = int(input())
A = list(map(int, input().split()))
total = sum(A)
if total % 2:
	print(0)
else:
	dp = [0] * (total // 2 + 1)
	dp[0] = 1
	for i in range(N):
		new_dp = dp[:]
		for j in range(A[i], total // 2 + 1):
			new_dp[j] += dp[j - A[i]]
		dp = new_dp
	if dp[-1] == 0:
		print(0)
	else:
		from math import gcd
		g = A[0]
		for i in range(1, N):
			g = gcd(g, A[i])
		for i in range(N):
			A[i] //= g
		cnt = 0
		while g % 2 == 0:
			cnt += 1
			g //= 2
		for i in range(N):
			if A[i] % 2:
				ans = i + 1
				break
		print(1)
		print(ans)


import sys
input = sys.stdin.readline
n = int(input())
l = list(map(int, input().split()))
dp = [[-1] * 200003 for _ in range(103)]

def fun(i, s):
	if s == 0:
		return 1
	if s < 0 or i >= n:
		return 0
	if dp[i][s] != -1:
		return dp[i][s]
	v = fun(i + 1, s - l[i])
	u = fun(i + 1, s)
	dp[i][s] = max(u, v)
	return dp[i][s]
su = sum(l)
if su % 2 == 1:
	print(0)
else:
	a = fun(0, sum(l) // 2)
	if a == 0:
		print(0)
	else:
		print(1)
		ma = 100
		ans = 1
		for i in range(len(l)):
			ss = 0
			while l[i] % 2 == 0:
				ss += 1
				l[i] //= 2
			ma = min(ma, ss)
			if ma == ss:
				ans = i + 1
		print(ans)


import math, sys
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
MOD = int(1000000000.0) + 7

def main():
	n = int(input())
	arr = list(map(int, input().split()))
	total = sum(arr)
	if total % 2 != 0:
		print(0)
		return
	dp = [[0 for i in range(n + 1)] for j in range(total // 2 + 1)]
	for i in range(n):
		dp[0][i] = 1
	for i in range(1, total // 2 + 1):
		for j in range(1, n + 1):
			dp[i][j] = dp[i][j - 1]
			if i >= arr[j - 1]:
				dp[i][j] = dp[i][j] | dp[i - arr[j - 1]][j - 1]
	if dp[total // 2][n]:
		i = 0
		while True:
			if arr[i] % 2 == 1:
				print(1)
				print(i + 1)
				return
			arr[i] //= 2
			i += 1
			if i == n:
				i = 0
	else:
		print(0)
t = 1
for _ in range(t):
	main()


import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
s = sum(a)
if s % 2:
	ans = 0
else:
	ans = 1
	dp = [[0] * (s + 1) for _ in range(n + 1)]
	dp[0][0] = 1
	for i in range(n):
		ai = a[i]
		for j in range(s + 1):
			dp[i + 1][j] |= dp[i][j]
		for j in range(s - ai):
			dp[i + 1][j + ai] |= dp[i][j]
	y = 0
	for i in range(n + 1):
		y |= dp[i][s // 2]
	if not y:
		ans = 0
	if ans:
		for i in range(n):
			si = s - a[i]
			if si % 2:
				x = i + 1
				break
			y = 0
			for j in range(n + 1):
				y |= dp[j][si // 2]
			if not y:
				x = i + 1
				break
print(ans)
if ans:
	print(x)


import sys, heapq, math
from collections import defaultdict, deque
input = sys.stdin.readline

def check(arr, su):
	su = su // 2
	dp = [[False for _ in range(su + 1)] for _ in range(n + 1)]
	for i in range(n + 1):
		dp[i][0] = True
	for i in range(1, n + 1):
		for j in range(1, su + 1):
			dp[i][j] = dp[i - 1][j]
			if j >= arr[i - 1]:
				dp[i][j] = dp[i][j] or dp[i - 1][j - arr[i - 1]]
	return dp[-1][-1]
n = int(input())
l = list(map(int, input().split()))
su = sum(l)
if su % 2 == 1 or not check(l, su):
	print(0)
else:
	f = 0
	for i in range(n):
		if l[i] % 2 == 1:
			print(1)
			print(i + 1)
			f = 1
			break
	if f == 0:
		f = 0
		while 1:
			for i in range(n):
				l[i] = l[i] // 2
				if l[i] % 2 != 0:
					print(1)
					print(i + 1)
					f = 1
					break
			if f == 1:
				break


def check(l):
	for v in l:
		if v % 2 == 1:
			return False
	else:
		return True

def findTargetSumWays(nums):
	sumAll = sum(nums)
	if 0 > sumAll or (0 + sumAll) % 2:
		return 0
	target = (0 + sumAll) // 2
	dp = [0] * (target + 1)
	dp[0] = 1
	for num in nums:
		for j in range(target, num - 1, -1):
			dp[j] = dp[j] + dp[j - num]
	return dp[-1]

def getResult(n, a_list):
	while check(a_list):
		a_list = [v // 2 for v in a_list]
	if findTargetSumWays(a_list) == 0:
		return (0, None)
	for i in range(n):
		if a_list[i] % 2 == 1:
			return (1, i + 1)
n = int(input())
a_list = [int(tt) for tt in input().split()]
(r1, r2) = getResult(n, a_list)
print(r1)
if r2:
	print(r2)


n = int(input())
a = list(map(int, input().split()))
sums = sum(a)
b = []
for i in range(n):
	b.append([i + 1])
dp = dict(zip(a, b))
for i in range(n):
	for j in range(sums // 2, 0, -1):
		if j - a[i] in dp and i + 1 not in dp[j - a[i]]:
			dp[j] = list(dp[j - a[i]])
			dp[j].append(i + 1)
if sums % 2 == 1 or sums // 2 not in dp:
	print(0)
else:
	flag = True
	while flag:
		for i in range(n):
			if a[i] % 2 == 1:
				print(1)
				print(i + 1)
				flag = False
				break
			else:
				a[i] = a[i] // 2
		if flag:
			sums = sums // 2
			if sums % 2 == 1:
				print(0)
				break


def solve(arr):
	s = sum(arr)
	if s & 1:
		print(0)
		return
	half = s // 2
	dp = [False] * (half + 1)
	dp[0] = True
	for a in arr:
		if a > half:
			print(0)
			return
		for j in range(half, a - 1, -1):
			dp[j] = dp[j] or dp[j - a]
	if not dp[-1]:
		print(0)
		return
	found = [None] * 13
	for (idx, a) in enumerate(arr):
		for i in range(13):
			if not found[i] and a >> i & 1:
				found[i] = idx + 1
	for i in range(13):
		if found[i] is not None:
			print(1)
			print(found[i])
			return
n = int(input())
arr = [int(x) for x in input().split()]
solve(arr)


import sys

def get_ints():
	return list(map(int, sys.stdin.readline().strip().split()))
N = int(input())
nums = get_ints()
s = sum(nums)
dp = [False] * (s + 1)
dp[0] = True
for a in nums:
	for b in range(s - a, -1, -1):
		if dp[b]:
			dp[a + b] = True
if s & 1 or not dp[s // 2]:
	print(0)
else:
	res = -1
	norm = 30
	for i in range(N):
		n = nums[i]
		cnt = 0
		while not n & 1:
			cnt += 1
			n >>= 1
		if cnt < norm:
			norm = cnt
			res = i
	print(1)
	print(res + 1)


from sys import stdin, stdout
from math import gcd, sqrt, factorial, pi, inf
from collections import deque, defaultdict
from bisect import bisect, bisect_left
from time import time
from itertools import permutations as per
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\r\n')
L = lambda : list(R())
P = lambda x: stdout.write(str(x) + '\n')
lcm = lambda x, y: x * y // gcd(x, y)
nCr = lambda x, y: f[x] * inv(f[y] * f[x - y] % N) % N
inv = lambda x: pow(x, N - 2, N)
sm = lambda x: (x ** 2 + x) // 2
N = 10 ** 9 + 7

def knap(n, w):
	if n == 0 or w == 0:
		return w
	if dp[n][w] != -1:
		return dp[n][w]
	if a[n - 1] > w:
		dp[n][w] = knap(n - 1, w)
		return dp[n][w]
	else:
		dp[n][w] = min(knap(n - 1, w - a[n - 1]), knap(n - 1, w))
		return dp[n][w]
n = I()
a = L()
w = sum(a) // 2
dp = [[-1] * (w + 1) for i in range(n + 1)]
if sum(a) % 2 == 0 == knap(n, sum(a) // 2):
	print(1)
	p = a[0]
	for i in range(n):
		if a[i] & 1:
			print(i + 1)
			exit()
		p = gcd(p, a[i])
	for i in range(n):
		if a[i] // p % 2:
			print(i + 1)
			exit()
else:
	print(0)


def good(a):
	s = sum(a)
	if s % 2 == 1:
		return False
	can = [False] * (s // 2 + 1)
	can[0] = True
	for e in a:
		for i in range(len(can) - 1 - e, -1, -1):
			if can[i]:
				can[i + e] = True
	return can[-1]

def calc(n):
	r = 0
	while n % 2 == 0:
		n //= 2
		r += 1
	return r

def solve(n, a):
	if not good(a):
		return []
	return [min(range(n), key=lambda i: calc(a[i])) + 1]
n = int(input())
a = list(map(int, input().split()))
res = solve(n, a)
print(len(res))
if res:
	print(*res)


import time
import os, sys
from io import BytesIO, IOBase
from types import GeneratorType
from bisect import bisect_left, bisect_right
from collections import defaultdict as dd, deque as dq, Counter as dc
import math, string, heapq as h
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			self.os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def getInt():
	return int(input())

def getStrs():
	return input().split()

def getInts():
	return list(map(int, input().split()))

def getStr():
	return input()

def listStr():
	return list(input())

def getMat(n):
	return [getInts() for _ in range(n)]

def getBin():
	return list(map(int, list(input())))

def isInt(s):
	return '0' <= s[0] <= '9'

def ceil_(a, b):
	return a // b + (a % b > 0)
MOD = 10 ** 9 + 7
from copy import deepcopy

def solve():
	N = getInt()
	A = getInts()
	S = sum(A)
	if S % 2:
		print(0)
		return
	sums = set([0])
	for a in A:
		new_sums = set()
		for s in sums:
			new_sums.add(s)
		for s in sums:
			new_sums.add(a + s)
		sums = new_sums
	if S // 2 not in sums:
		print(0)
		return
	two_min = 65
	two_min_idx = -1
	for (i, a) in enumerate(A):
		num = 0
		x = a
		while x % 2 == 0:
			x //= 2
			num += 1
		if num < two_min:
			two_min = num
			two_min_idx = i
	print(1)
	print(two_min_idx + 1)
	return
solve()


n = int(input())
a = list(map(int, input().split()))
s = sum(a)
if s % 2 == 1:
	print(0)
	exit()
dp = [[False] * (s // 2 + 1) for _ in range(n + 1)]
dp[0][0] = True
for i in range(n):
	for j in range(s // 2 + 1):
		if j < a[i]:
			dp[i + 1][j] = dp[i][j]
		else:
			dp[i + 1][j] |= dp[i][j - a[i]] | dp[i][j]
if not dp[n][s // 2]:
	print(0)
else:
	l = []
	for i in a:
		cnt = 0
		while i % 2 == 0:
			i //= 2
			cnt += 1
		l.append(cnt)
	print(1)
	print(l.index(min(l)) + 1)


def answer():
	s = sum(a)
	dp = [[False for i in range(s + 1)] for j in range(n + 1)]
	hs = False
	dp[0][0] = True
	for i in range(n):
		for j in range(s + 1):
			dp[i + 1][j] |= dp[i][j]
			if dp[i][j]:
				dp[i + 1][j + a[i]] = True
				if j == s - j:
					hs = True
					break
	if not hs:
		print(0)
		return
	print(1)
	for i in range(30):
		for j in range(n):
			if a[j] >> i & 1:
				print(j + 1)
				return
n = int(input())
a = list(map(int, input().split()))
answer()


n = int(input())
xs = [int(x) for x in input().split()]
while all((x % 2 == 0 for x in xs)):
	xs = [x // 2 for x in xs]
sm = sum(xs)
if sum(xs) % 2 == 1:
	print(0)
	exit()
dp = set([0])
good = True
for x in xs:
	toadd = set()
	for s in dp:
		num = x + s
		if num == sm // 2:
			good = False
			break
		toadd.add(num)
	dp = dp.union(toadd)
if good:
	print(0)
else:
	print(1)
	for (i, x) in enumerate(xs):
		if x % 2 == 1:
			print(i + 1)
			break


import sys
from collections import deque
from queue import PriorityQueue
from math import gcd
input_ = lambda : sys.stdin.readline().strip('\r\n')
ii = lambda : int(input_())
il = lambda : list(map(int, input_().split()))
ilf = lambda : list(map(float, input_().split()))
ip = lambda : input_()
fi = lambda : float(input_())
ap = lambda ab, bc, cd: ab[bc].append(cd)
li = lambda : list(input_())
pr = lambda x: print(x)
prinT = lambda x: print(x)
f = lambda : sys.stdout.flush()
mod = 10 ** 9 + 7
n = ii()
a = il()
if n == 2:
	if a[0] == a[1]:
		print(1)
		print(1)
	else:
		print(0)
	exit(0)

def isdpSum(arr, n, sum):
	dp = [[False for i in range(sum + 1)] for i in range(n + 1)]
	for i in range(n + 1):
		dp[i][0] = True
	for i in range(1, sum + 1):
		dp[0][i] = False
	for i in range(1, n + 1):
		for j in range(1, sum + 1):
			if j < arr[i - 1]:
				dp[i][j] = dp[i - 1][j]
			if j >= arr[i - 1]:
				dp[i][j] = dp[i - 1][j] or dp[i - 1][j - arr[i - 1]]
	return dp[n][sum]
s = sum(a)
if s % 2:
	print(0)
	exit(0)
if not isdpSum(a, n, s // 2):
	print(0)
	exit(0)
g = a[0]
for i in range(1, n):
	g = gcd(g, a[i])
b = a.copy()
for i in range(n):
	b[i] = b[i] // g
s = sum(b)
if s % 2:
	print(0)
	exit(0)
print(1)
for i in range(n):
	if b[i] % 2:
		print(i + 1)
		exit(0)


def isSubsetSum(arr, n, sm):
	subset = [[False for j in range(sm + 1)] for i in range(3)]
	for i in range(n + 1):
		for j in range(sm + 1):
			if j == 0:
				subset[i % 2][j] = True
			elif i == 0:
				subset[i % 2][j] = False
			elif arr[i - 1] <= j:
				subset[i % 2][j] = subset[(i + 1) % 2][j - arr[i - 1]] or subset[(i + 1) % 2][j]
			else:
				subset[i % 2][j] = subset[(i + 1) % 2][j]
	return subset[n % 2][sm]

def solve(n, arr):
	s = sum(arr)
	if s % 2 != 0:
		print(0)
		return
	sn = s // 2
	if isSubsetSum(arr, n, sn) == False:
		print(0)
		return
	for i in range(n):
		if arr[i] % 2 != 0:
			print(1)
			print(i + 1)
			return
	while True:
		for i in range(n):
			arr[i] = arr[i] // 2
			if arr[i] % 2 != 0:
				print(1)
				print(i + 1)
				return
n = int(input())
arr = list(map(int, input().split(' ')))
solve(n, arr)


n = int(input())
a = list(map(int, input().split()))
S = sum(a)
dp = [False] * (S + 1)
dp[0] = True
for x in a:
	for y in range(S - x, -1, -1):
		dp[x + y] = dp[x + y] or dp[y]
if S % 2 == 1 or not dp[S // 2]:
	print(0)
	exit()
else:
	norm = 30
	res = -1
	for (i, x) in enumerate(a):
		cnt = 0
		while x & 1 == 0:
			cnt += 1
			x >>= 1
		if cnt < norm:
			norm = cnt
			res = i
	print(1)
	print(res + 1)


import os
import sys
from io import BytesIO, IOBase
_print = print
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def inp():
	return sys.stdin.readline().rstrip()

def mpint():
	return map(int, inp().split(' '))

def itg():
	return int(inp())

def sum_partition(iterable):
	iterable = tuple(iterable)
	s = sum(iterable)
	half = s >> 1
	dp = [0] * (half + 1)
	for i in range(len(iterable)):
		for h in range(half, iterable[i] - 1, -1):
			dp[h] = max(dp[h], dp[h - iterable[i]] + iterable[i])
	return dp[half] == s - dp[half]

def main():
	n = itg()
	arr = tuple(mpint())
	if not sum_partition(arr):
		print(0)
		return
	print(1)
	d = {}
	for (i, a) in enumerate(arr):
		d[a] = i + 1
	while True:
		new = {}
		for k in d:
			if k & 1:
				print(d[k])
				return
			else:
				new[k >> 1] = d[k]
		d = new
DEBUG = 0
URL = 'https://codeforces.com/contest/1516/problem/C'
if DEBUG == 1:
	import requests
	from ACgenerator.Y_Test_Case_Runner import TestCaseRunner
	runner = TestCaseRunner(main, URL)
	inp = runner.input_stream
	print = runner.output_stream
	runner.checking()
else:
	if DEBUG != 2:
		(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	if DEBUG:

		def print(*args, **kwargs):
			_print(*args, **kwargs)
			sys.stdout.flush()
	main()


def findPartition(arr, n):
	sum = 0
	(i, j) = (0, 0)
	for i in range(n):
		sum += arr[i]
	if sum % 2 != 0:
		return False
	part = [[True for i in range(n + 1)] for j in range(sum // 2 + 1)]
	for i in range(0, n + 1):
		part[0][i] = True
	for i in range(1, sum // 2 + 1):
		part[i][0] = False
	for i in range(1, sum // 2 + 1):
		for j in range(1, n + 1):
			part[i][j] = part[i][j - 1]
			if i >= arr[j - 1]:
				part[i][j] = part[i][j] or part[i - arr[j - 1]][j - 1]
	return part[sum // 2][n]
for _ in range(1):
	n = int(input())
	arr = list(map(int, input().split()))
	s = sum(arr)
	if not findPartition(arr, n):
		print(0)
	else:
		f = 0
		for i in range(n):
			if arr[i] % 2 == 1:
				c = i
				f = 1
				break
		if f:
			print(1)
			print(c + 1)
		else:
			f = 0
			c = 0
			while f == 0:
				for i in range(n):
					arr[i] //= 2
					if arr[i] % 2 == 1:
						c = i
						f = 1
			print(1)
			print(c + 1)


import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
input = lambda : sys.stdin.readline().rstrip()
import bisect, string, math, time, functools, random, fractions
from bisect import *
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
from itertools import permutations, combinations, groupby
rep = range
R = range

def I():
	return int(input())

def LI():
	return [int(i) for i in input().split()]

def LI_():
	return [int(i) - 1 for i in input().split()]

def AI():
	return map(int, open(0).read().split())

def S_():
	return input()

def IS():
	return input().split()

def LS():
	return [i for i in input().split()]

def NI(n):
	return [int(input()) for i in range(n)]

def NI_(n):
	return [int(input()) - 1 for i in range(n)]

def NLI(n):
	return [[int(i) for i in input().split()] for i in range(n)]

def NLI_(n):
	return [[int(i) - 1 for i in input().split()] for i in range(n)]

def StoLI():
	return [ord(i) - 97 for i in input()]

def ItoS(n):
	return chr(n + 97)

def LtoS(ls):
	return ''.join([chr(i + 97) for i in ls])

def RLI(n=8, a=1, b=10):
	return [random.randint(a, b) for i in range(n)]

def RI(a=1, b=10):
	return random.randint(a, b)

def INP():
	N = 10
	n = random.randint(1, N)
	a = RLI(n, 0, n - 1)
	return (n, a)

def Rtest(T):
	(case, err) = (0, 0)
	for i in range(T):
		inp = INP()
		a1 = naive(*inp)
		a2 = solve(*inp)
		if a1 != a2:
			print(inp)
			print('naive', a1)
			print('solve', a2)
			err += 1
		case += 1
	print('Tested', case, 'case with', err, 'errors')

def GI(V, E, ls=None, Directed=False, index=1):
	org_inp = []
	g = [[] for i in range(V)]
	FromStdin = True if ls == None else False
	for i in range(E):
		if FromStdin:
			inp = LI()
			org_inp.append(inp)
		else:
			inp = ls[i]
		if len(inp) == 2:
			(a, b) = inp
			c = 1
		else:
			(a, b, c) = inp
		if index == 1:
			a -= 1
			b -= 1
		aa = (a, c)
		bb = (b, c)
		g[a].append(bb)
		if not Directed:
			g[b].append(aa)
	return (g, org_inp)

def GGI(h, w, search=None, replacement_of_found='.', mp_def={'#': 1, '.': 0}, boundary=1):
	mp = [boundary] * (w + 2)
	found = {}
	for i in R(h):
		s = input()
		for char in search:
			if char in s:
				found[char] = (i + 1) * (w + 2) + s.index(char) + 1
				mp_def[char] = mp_def[replacement_of_found]
		mp += [boundary] + [mp_def[j] for j in s] + [boundary]
	mp += [boundary] * (w + 2)
	return (h + 2, w + 2, mp, found)

def TI(n):
	return GI(n, n - 1)

def accum(ls):
	rt = [0]
	for i in ls:
		rt += [rt[-1] + i]
	return rt

def bit_combination(n, base=2):
	rt = []
	for tb in R(base ** n):
		s = [tb // base ** bt % base for bt in R(n)]
		rt += [s]
	return rt

def gcd(x, y):
	if y == 0:
		return x
	if x % y == 0:
		return y
	while x % y != 0:
		(x, y) = (y, x % y)
	return y

def YN(x):
	print(['NO', 'YES'][x])

def Yn(x):
	print(['No', 'Yes'][x])

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
mo = 10 ** 9 + 7
inf = float('inf')
FourNb = [(-1, 0), (1, 0), (0, 1), (0, -1)]
EightNb = [(-1, 0), (1, 0), (0, 1), (0, -1), (1, 1), (-1, -1), (1, -1), (-1, 1)]
compas = dict(zip('WENS', FourNb))
cursol = dict(zip('LRUD', FourNb))
alp = [chr(ord('a') + i) for i in range(26)]

def gcj(c, x):
	print('Case #{0}:'.format(c + 1), x)

def primeFactor(N):
	(i, n) = (2, N)
	ret = {}
	(d, sq) = (2, 99)
	while i <= sq:
		k = 0
		while n % i == 0:
			(n, k, ret[i]) = (n // i, k + 1, k + 1)
		if k > 0 or i == 97:
			sq = int(n ** (1 / 2) + 0.5)
		if i < 4:
			i = i * 2 - 1
		else:
			(i, d) = (i + d, d ^ 6)
	if n > 1:
		ret[n] = 1
	return ret

def divisor(n):
	div = [1]
	for (i, j) in primeFactor(n).items():
		div = [i ** k * d for d in div for k in range(j + 1)]
	return div

def PrimeNumSet(N):
	M = int(N ** 0.5)
	seachList = [i for i in range(2, N + 1)]
	primes = []
	while seachList:
		if seachList[0] > M:
			break
		primes.append(seachList[0])
		tmp = seachList[0]
		seachList = [i for i in seachList if i % tmp != 0]
	return primes + seachList

def LCM(b, mo=10 ** 9 + 7):
	prs = PrimeNumSet(max(b))
	M = dict(zip(prs, [0] * len(prs)))
	for i in b:
		dc = primeFactor(i)
		for (j, k) in dc.items():
			M[j] = max(M[j], k)
	r = 1
	for (j, k) in M.items():
		if k != 0:
			r *= pow(j, k, mo)
			r %= mo
	return r

def extgcd(x, y):
	if y == 0:
		return (1, 0)
	(r0, r1, s0, s1) = (x, y, 1, 0)
	while r1 != 0:
		(r0, r1, s0, s1) = (r1, r0 % r1, s1, s0 - r0 // r1 * s1)
	return (s0, (r0 - s0 * x) // y, x * s0 + y * (r0 - s0 * x) // y)

def crt(rems, mods):
	n = len(rems)
	if n != len(mods):
		return NotImplemented
	(x, d) = (0, 1)
	for (r, m) in zip(rems, mods):
		(a, b, g) = extgcd(d, m)
		(x, d) = ((m * b * x + d * a * r) // g, d * (m // g))
		x %= d
	for (r, m) in zip(rems, mods):
		if r != x % m:
			return (-1, d)
	return (x, d)

def intsqrt(x):
	if x < 0:
		return NotImplemented
	rt = int(x ** 0.5) - 1
	while (rt + 1) ** 2 <= x:
		rt += 1
	return rt
show_flg = False
show_flg = True
ans = 0
n = I()
a = LI()
bi = []
for i in range(n):
	c = a[i]
	t = 0
	while c % 2 == 0:
		c //= 2
		t += 1
	bi += (t,)
e = 2 ** min(bi)
a = [i // e for i in a]
s = sum(a)
if s % 2 == 1:
	ans = 0
else:
	d = [False] * (s + 1)
	d[0] = True
	for i in range(n):
		c = a[i]
		for j in range(s, c - 1, -1):
			if d[j - c] == True:
				d[j] = True
	if d[s // 2]:
		ans = 1
		for i in range(n):
			if a[i] % 2 == 1:
				k = i + 1
	else:
		ans = 0
print(ans)
if ans == 1:
	print(k)
exit()
show([i for (i, j) in enumerate(d) if j], 'd')
show(a)


def solve(arr):
	n = len(arr)
	mask = 0
	for a in arr:
		mask |= a
	d = 0
	while mask & 1 << d == 0:
		d += 1
	for i in range(n):
		arr[i] >>= d
	total = sum(arr)
	if total & 1:
		return 0
	target = total // 2
	f = [False] * (target + 1)
	f[0] = True
	for a in arr:
		if a <= target and f[target - a]:
			f[-1] = True
			break
		for x in range(target, a - 1, -1):
			f[x] |= f[x - a]
	if f[-1]:
		print(1)
		for (i, a) in enumerate(arr, 1):
			if a & 1:
				return i
	return 0
input()
arr = list(map(int, input().split()))
print(solve(arr))


n = int(input())
a = list(map(int, input().split()))
s = sum(a)
if s % 2 == 1:
	print(0)
else:
	s = s // 2
	dp = [[False for i in range(s + 1)] for _ in range(len(a) + 1)]
	for i in range(len(dp)):
		dp[i][0] = True
	for i in range(1, len(a) + 1):
		for j in range(1, s + 1):
			if j >= a[i - 1]:
				dp[i][j] = dp[i - 1][j] or dp[i - 1][j - a[i - 1]]
			else:
				dp[i][j] = dp[i - 1][j]
	if not dp[n][s]:
		print(0)
	else:
		f = 0
		for i in range(len(a)):
			if a[i] % 2 == 1:
				print(1)
				print(i + 1)
				f = 1
				break
		if f == 0:
			f = 1
			while f:
				for i in range(len(a)):
					if a[i] % 2 == 1:
						print(1)
						print(i + 1)
						f = 0
						break
					a[i] = a[i] // 2


def inp():
	return [int(a) for a in input().split()]

def gcd(x, y):
	if y:
		return gcd(y, x % y)
	else:
		return x

def bad(array):
	st = set()
	st.add(0)
	for i in array:
		st1 = set()
		for j in st:
			st1.add(i + j)
		st = st.union(st1)
	if sum(array) // 2 in st:
		return True
	return False
ind = []
n = int(input())
a = inp()
g = a[0]
for i in range(1, n):
	g = gcd(g, a[i])
for i in range(n):
	a[i] //= g
if sum(a) % 2 == 1:
	print(0)
elif bad(a):
	for i in range(n):
		if a[i] % 2:
			print(1)
			print(i + 1)
			break
else:
	print(0)


import sys
import math
LI = lambda : [int(k) for k in input().split()]
input = lambda : sys.stdin.readline().rstrip()
IN = lambda : int(input())
S = lambda : input()
n = IN()
a = LI()
s = sum(a)
if s % 2 == 1:
	print(0)
	sys.exit()
s //= 2
dp = [[False for i in range(s + 1)] for j in range(n + 1)]
for i in range(n + 1):
	dp[i][0] = True
for i in range(s + 1):
	dp[0][i] = False
for i in range(1, n + 1):
	for j in range(1, s + 1):
		if a[i - 1] > j:
			dp[i][j] = dp[i - 1][j]
		else:
			dp[i][j] = dp[i - 1][j] or dp[i - 1][j - a[i - 1]]
if dp[n][s]:
	flag = 1
	while flag:
		for i in range(n):
			if a[i] % 2 == 1:
				print(1)
				print(i + 1)
				flag = 0
				break
			else:
				a[i] /= 2
else:
	print(0)


import sys
import math

def input():
	return sys.stdin.readline().strip('\n')

def I():
	return input()

def II():
	return int(input())

def MI():
	return map(int, input().split())

def LI():
	return list(map(int, input().split()))

def findPartition(arr, n, s):
	if s % 2 == 1:
		return False
	for i in range(0, n + 1):
		part[0][i] = True
	for i in range(1, s // 2 + 1):
		part[i][0] = False
	for i in range(1, s // 2 + 1):
		for j in range(1, n + 1):
			part[i][j] = part[i][j - 1]
			if i >= arr[j - 1]:
				part[i][j] = part[i][j] or part[i - arr[j - 1]][j - 1]
	return part[s // 2][n]
n = II()
a = LI()
s = 0
(i, j) = (0, 0)
for i in range(n):
	s += a[i]
part = [[True for i in range(n + 1)] for j in range(s // 2 + 1)]
if findPartition(a, n, s) == False:
	print(0)
else:
	switch = 0
	while True:
		for i in range(n):
			if a[i] % 2 == 1:
				print(1)
				print(i + 1)
				switch = 1
				break
			a[i] = a[i] // 2
		if switch == 1:
			break


import functools, math, sys
input = sys.stdin.readline

def knapsack(capacity, utility, weight):
	backpack = [[0 for i in range(capacity + 1)] for j in range(2)]
	for i in range(len(weight)):
		for j in range(capacity + 1):
			if weight[i] <= j:
				backpack[(i + 1) % 2][j] = max(utility[i] + backpack[i % 2][j - weight[i]], backpack[i % 2][j])
			else:
				backpack[(i + 1) % 2][j] = backpack[i % 2][j]
	return backpack[len(weight) % 2][capacity]
(n, values) = (int(input()), [int(i) for i in input().split()])
(tot, tar) = (sum(values), sum(values) // 2)
if tot % 2 or knapsack(tar, values, values) != tar:
	print(0)
	sys.exit()
gcd = functools.reduce(math.gcd, values)
values = [values[i] // gcd for i in range(n)]
for i in range(n):
	if values[i] % 2:
		print(1)
		print(i + 1)
		sys.exit()


import sys
import math
from collections import defaultdict
from sys import stdin
input = stdin.readline
m = 10 ** 9 + 7
sys.setrecursionlimit(10 ** 5)
n = int(input())
arr = list(map(int, input().split()))

def checker(set, n, sum):
	subset = [[False for i in range(sum + 1)] for i in range(n + 1)]
	for i in range(n + 1):
		subset[i][0] = True
	for i in range(1, sum + 1):
		subset[0][i] = False
	for i in range(1, n + 1):
		for j in range(1, sum + 1):
			if j < set[i - 1]:
				subset[i][j] = subset[i - 1][j]
			if j >= set[i - 1]:
				subset[i][j] = subset[i - 1][j] or subset[i - 1][j - set[i - 1]]
	return subset[n][sum]
if sum(arr) % 2:
	print(0)
else:
	f = checker(arr, len(arr), sum(arr) // 2)
	ans = []
	if f:
		arr_m = arr.copy()
		arr.sort()
		for i in range(n):
			x = arr.copy()
			x.remove(arr[i])
			s = sum(x)
			if s % 2:
				print(1)
				print(arr_m.index(arr[i]) + 1)
				break
			f = checker(x, n - 1, s // 2)
			if f:
				continue
			else:
				print(1)
				print(arr_m.index(arr[i]) + 1)
				break
	else:
		print(0)


import sys
import os.path
from collections import *
import math
import bisect
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	input = sys.stdin.readline

def findPartition(arr, n):
	sum = 0
	(i, j) = (0, 0)
	for i in range(n):
		sum += arr[i]
	if sum % 2 != 0:
		return False
	part = [[True for i in range(n + 1)] for j in range(sum // 2 + 1)]
	for i in range(0, n + 1):
		part[0][i] = True
	for i in range(1, sum // 2 + 1):
		part[i][0] = False
	for i in range(1, sum // 2 + 1):
		for j in range(1, n + 1):
			part[i][j] = part[i][j - 1]
			if i >= arr[j - 1]:
				part[i][j] = part[i][j] or part[i - arr[j - 1]][j - 1]
	return part[sum // 2][n]
n = int(input())
arr = [int(x) for x in input().split()]
p = 2
if findPartition(arr, n) == True:
	while True:
		y = 0
		for i in range(n):
			if arr[i] % p:
				y = i + 1
				break
		if y:
			print(1)
			print(y)
			break
		else:
			p *= 2
else:
	print(0)


def possible(nums, target):
	reach = {0}
	for num in nums:
		reach |= {i + num for i in reach if i + num <= target}
	if target in reach:
		return True
	return False
n = int(input())
arr = list(map(int, input().split()))
s = sum(arr)
if s % 2 == 1 or not possible(arr, s // 2):
	print(0)
else:
	print(1)
	mi = 100
	res = -1
	for i in range(n):
		A = arr[i] & -arr[i]
		cnt = 0
		while A:
			cnt += 1
			A >>= 1
		if cnt < mi:
			mi = cnt
			res = i + 1
	print(res)


def highestPowerOf2(n):
	return n & ~(n - 1)

def solve(a):
	s = sum(a)
	(q, r) = divmod(s, 2)
	if r == 1:
		return (0, 0)
	else:
		x = 1
		for ai in a:
			x |= x << ai
		if not x >> q & 1:
			return (0, 0)
		else:
			powers2 = [highestPowerOf2(ai) for ai in a]
			return (1, powers2.index(min(powers2)))
n = int(input())
a = list(map(int, input().split()))
ans = solve(a)
print(ans[0])
if ans[0]:
	print(ans[1] + 1)


from math import gcd
n = int(input())
A = list(map(int, input().split()))
s = sum(A)
M = 2 * 10 ** 5 + 1
dp = [0] * (M + 5)
dp[0] = 1
g = A[0]
ind = 0
for a in A:
	g = gcd(a, g)
	for j in range(M)[::-1]:
		if j + a <= M:
			dp[j + a] |= dp[j]
if s % 2 or dp[s // 2] == 0:
	print(0)
	exit()
for (i, a) in enumerate(A, 1):
	if a // g % 2:
		print(1)
		print(i)
		exit()


import sys
input = sys.stdin.readline
n = int(input())
A = list(map(int, input().split()))
tot = sum(A)
if tot % 2:
	print(0)
else:
	target = tot // 2
	dp = [0] * (target + 1)
	dp[0] = 1
	for a in A:
		for i in range(target, a - 1, -1):
			dp[i] |= dp[i - a]
	if not dp[-1]:
		print(0)
	else:
		odd = [i for (i, a) in enumerate(A, 1) if a % 2]
		even = [i for (i, a) in enumerate(A, 1) if not a % 2]
		if odd:
			print(1)
			print(odd[0])
		else:
			while True:
				(x, y) = ([], [])
				for i in even:
					A[i - 1] //= 2
					if A[i - 1] % 2:
						x.append(i)
					else:
						y.append(i)
				if x:
					break
				even = y
			print(1)
			print(x[0])


N = int(input())
aa = [int(x) for x in input().split()]

def get_max_pow2_factor(x):
	result = 0
	cur_a = x
	while cur_a > 0 and cur_a % 2 == 0:
		cur_a //= 2
		result += 1
	return result
shared_pow2_factor = min([get_max_pow2_factor(x) for x in aa])
if shared_pow2_factor > 0:
	aa = [x // 2 ** shared_pow2_factor for x in aa]
odd_a = None
odd_a_index = None
for i in range(len(aa)):
	if aa[i] % 2 != 0:
		odd_a = aa[i]
		odd_a_index = i
		break
if sum(aa) % 2 == 1:
	print(0)
else:
	sum_a = sum(aa)
	target = sum_a // 2
	aa = sorted(aa, key=lambda x: -x)
	dp = set()
	have_solution = False
	for a in aa:
		new_add = set()
		for num in dp:
			new_add.add(num + a)
		new_add.add(a)
		dp = dp | new_add
		if target in dp:
			have_solution = True
			break
	if have_solution:
		print(1)
		print(odd_a_index + 1)
	else:
		print(0)


for _ in range(1):
	n = int(input())
	a = list(map(int, input().split()))
	b = a[:]
	a.sort()
	a = a
	if sum(a) % 2 == 1:
		print(0)
		continue
	add = sum(a)
	arr1 = [0] * (add + 2)
	for i in range(n - 1):
		arr1[a[i]] = 1
		for j in range(add, -1, -1):
			if arr1[j] > 0:
				arr1[j + a[i + 1]] = 1
		arr1[a[i + 1]] = 1
	if arr1[add // 2] == 0:
		print(0)
		continue
	indx = -1
	mini = 99999999999
	for i in range(n):
		j = 0
		while b[i] % 2 ** j == 0:
			j += 1
		if j < mini:
			mini = j
			indx = i
	print(1)
	print(indx + 1)


import sys
import math

def solve(N, A):
	g = A[0]
	for a in A:
		g = math.gcd(g, a)
	A2 = [a // g for a in A]
	s = sum(A2)
	if s % 2:
		return []
	h = s // 2
	S = [0] * (h + 1)
	S[0] = 1
	for a in A2:
		for i in range(h, a - 1, -1):
			if not S[i - a]:
				continue
			S[i] = 1
	if not S[-1]:
		return []
	for i in range(N):
		if A2[i] % 2:
			return [i + 1]
	raise ValueError

def main():
	input = sys.stdin.readline
	(n,) = map(int, input().split())
	A = list(map(int, input().split()))
	B = solve(n, A)
	print(len(B))
	if B:
		print(*B)
main()


N = int(input())
A = list(map(int, input().split()))

def findPartiion(arr, n):
	Sum = 0
	for i in range(n):
		Sum += arr[i]
	if Sum % 2 != 0:
		return 0
	part = [0] * (Sum // 2 + 1)
	for i in range(Sum // 2 + 1):
		part[i] = 0
	for i in range(n):
		for j in range(Sum // 2, arr[i] - 1, -1):
			if part[j - arr[i]] == 1 or j == arr[i]:
				part[j] = 1
	return part[Sum // 2]
if not findPartiion(A, N):
	print(0)
else:
	mod = 2
	Done = False
	while 1:
		for (i, elt) in enumerate(A):
			if elt % mod != 0:
				print(1)
				print(i + 1)
				Done = True
				break
		if Done:
			break
		mod *= 2


import math
import random
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
import sys
import threading
from collections import defaultdict
threading.stack_size(10 ** 8)
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
sys.setrecursionlimit(300000)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n

class SegmentTree1:

	def __init__(self, data, default=2 ** 51, func=lambda a, b: a & b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: max(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] < key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def binary(x, length):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater
for ik in range(1):
	n = int(input())
	l = list(map(int, input().split()))
	w = sum(l)
	gc = 0
	for i in range(n):
		gc = int(math.gcd(l[i], gc))
	for i in range(n):
		l[i] //= gc
	t = 0
	ind1 = -1
	for i in range(n):
		if l[i] % 2 == 1:
			t = 1
			ind1 = i
			break

	def findPartition(arr, n):
		sum = 0
		(i, j) = (0, 0)
		for i in range(n):
			sum += arr[i]
		if sum % 2 != 0:
			return False
		part = [[True for i in range(n + 1)] for j in range(sum // 2 + 1)]
		for i in range(0, n + 1):
			part[0][i] = True
		for i in range(1, sum // 2 + 1):
			part[i][0] = False
		for i in range(1, sum // 2 + 1):
			for j in range(1, n + 1):
				part[i][j] = part[i][j - 1]
				if i >= arr[j - 1]:
					part[i][j] = part[i][j] or part[i - arr[j - 1]][j - 1]
		return part[sum // 2][n]
	if findPartition(l, n) == False or w % 2 == 1:
		print(0)
		continue
	elif t == 1:
		print(1)
		print(ind1 + 1)
		continue


from sys import stdin, stdout
input = stdin.readline

def main():
	t = 1
	for z in range(t):
		n = int(input())
		ai = list(map(int, input().split()))
		num2 = sum(ai)
		if num2 % 2 != 0:
			print(0)
			return
		num3 = num2 // 2
		n2 = 1000 * n
		ar = [0] * (n2 + 2001)
		ar[0] = 1
		for i in range(n):
			for j in range(n2 - 1, -1, -1):
				ar[j + ai[i]] |= ar[j]
		if ar[num3] == 0:
			print(0)
			return
		num = 2
		while 1:
			ai2 = [i % num for i in ai]
			if max(ai2):
				print(1)
				print(ai2.index(num // 2) + 1)
				return
			num *= 2
main()


from sys import stdin, stdout, maxsize
import math
R = lambda : stdin.readline().strip()
RL = lambda f=None: list(map(f, R().split(' '))) if f else list(R().split(' '))
output = lambda x: stdout.write(str(x) + '\n')
output_list = lambda x: output(' '.join(map(str, x)))

def get_gcd(a):
	gcd = a[0]
	for i in a:
		gcd = math.gcd(gcd, i)
	return gcd

def odd_ind(a):
	for (i, x) in enumerate(a):
		if x % 2:
			return i
	return -1

def is_good(a):
	k = sum(a)
	if k % 2:
		return True
	n = len(a)
	MX = int(200000.0 + 5)
	dp = [MX * [0] for i in range(n)]
	for i in range(n):
		dp[i][a[i]] = 1
		dp[i][0] = 1
	for i in range(1, n):
		for j in range(a[i], MX):
			dp[i][j] = dp[i][j] or dp[i - 1][j - a[i]] or dp[i - 1][j]
	k = k // 2
	for i in range(n):
		if dp[i][k]:
			return False
	return True
n = int(R())
a = RL(int)
if is_good(a):
	print(0)
	exit()
ans = odd_ind(a)
while ans == -1:
	gcd = get_gcd(a)
	for i in range(n):
		a[i] = a[i] / gcd
	ans = odd_ind(a)
print(1)
print(ans + 1)


def helper2(a, tar):
	pool = [0] * 200005
	pool[0] = 1
	for i in range(len(a)):
		child = []
		for j in range(tar):
			if pool[j] == 1:
				child.append(j + a[i])
		for c in child:
			pool[c] = 1
	return pool[tar] == 1

def helper(a):
	if sum(a) % 2 == 1:
		return -1
	if helper2(a, sum(a) // 2):
		while True:
			for i in range(len(a)):
				if a[i] % 2 == 1:
					return i
				a[i] = a[i] // 2
	else:
		return -1
n = int(input())
a = list(map(int, input().split(' ')))
res = helper(a)
if res == -1:
	print(0)
	print()
else:
	print(1)
	print(res + 1)


maxn = 200700
n = int(input())
a = list(map(int, input().split()))
dp = [0] * (2 * maxn)
dp[0] = 1
s = sum(a)
if s & 1:
	print(0)
	exit()
for v in a:
	for i in range(s, -1, -1):
		dp[i + v] |= dp[i]
if dp[s // 2] == 0:
	print(0)
else:
	for (i, v) in enumerate(a, 1):
		if v & 1 or dp[(s - v) // 2] == 0:
			print(1)
			print(i)
			break
	else:
		print(0)


n = int(input())
a = list(map(int, input().split()))
s = sum(a)
if s % 2:
	print(0)
	exit()
dp = [[0 for i in range(s + 1)] for j in range(n)]
for i in range(n):
	dp[i][0] = 1
dp[0][a[0]] = 1
for i in range(1, n):
	for j in range(1, s + 1):
		if j > a[i]:
			dp[i][j] = max(dp[i][j], dp[i - 1][j - a[i]])
		dp[i][j] = max(dp[i][j], dp[i - 1][j])
if dp[-1][s // 2] == 0:
	print(0)
	exit()
m = 10 ** 18
for i in range(n):
	b = bin(a[i])[2:][::-1]
	ind = b.index('1')
	if ind < m:
		m = ind
		ans = i
print(1)
print(ans + 1)


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
n = int(input())
lst = list(map(int, input().split()))

def can_partition(num):
	s = sum(num)
	if s % 2 != 0:
		return False
	dp = [[-1 for x in range(int(s / 2) + 1)] for y in range(len(num))]
	return True if can_partition_recursive(dp, num, int(s / 2), 0) == 1 else False

def can_partition_recursive(dp, num, sum, currentIndex):
	if sum == 0:
		return 1
	n = len(num)
	if n == 0 or currentIndex >= n:
		return 0
	if dp[currentIndex][sum] == -1:
		if num[currentIndex] <= sum:
			if can_partition_recursive(dp, num, sum - num[currentIndex], currentIndex + 1) == 1:
				dp[currentIndex][sum] = 1
				return 1
		dp[currentIndex][sum] = can_partition_recursive(dp, num, sum, currentIndex + 1)
	return dp[currentIndex][sum]
sumN = sum(lst)
if sumN % 2:
	print(0)
else:
	ans = 0
	if not can_partition(lst):
		print(0)
	else:
		print(1)
		while True:
			odd = None
			for i in range(n):
				if lst[i] % 2 == 1:
					print(i + 1)
					sys.exit()
				lst[i] //= 2


import sys

def find_least_significant_bit(x):
	binary = bin(x)
	bit_location = binary.rfind('1')
	return len(binary) - bit_location
n = int(input())
a = list(map(int, input().split()))
sums = {0}
for e in a:
	sums_with_e = {s + e for s in sums}
	sums.update(sums_with_e)
total = sum(a)
if total % 2 == 0 and total // 2 in sums:
	print(1)
	least_significant_set_bits = [find_least_significant_bit(e) for e in a]
	print(least_significant_set_bits.index(min(least_significant_set_bits)) + 1)
else:
	print(0)
	print()


import io
import os
from collections import Counter, defaultdict, deque

def canPartition(A):
	if not A:
		return True
	possible = {0}
	for x in A:
		nextPossible = set()
		for y in possible:
			nextPossible.add(y - x)
			nextPossible.add(y + x)
		possible = nextPossible
	return 0 in possible

def solve1(N, A):
	best = (float('inf'),)
	for mask in range(1 << N):
		keep = []
		removed = []
		for i in range(N):
			if 1 << i & mask:
				removed.append(A[i])
			else:
				keep.append(A[i])
		if not canPartition(keep):
			best = min(best, (len(removed), removed))
	ans = best[1]
	return str(len(ans)) + '\n' + ' '.join(map(str, ans))

def solve(N, A):
	if sum(A) % 2 == 1:
		return '0'
	if not canPartition(A):
		return '0'
	for i in range(N):
		if not canPartition(A[:i] + A[i + 1:]):
			ans = [i + 1]
			break
	else:
		assert False
	return str(len(ans)) + '\n' + ' '.join(map(str, ans))
DEBUG = False
if DEBUG:
	import random
	random.seed(0)
	for _ in range(1000000):
		N = random.randint(2, 5)
		A = [random.randint(1, 5) for i in range(N)]
		print('tc' + str(_), N, A)
		ans = int(solve(N, A).split()[0])
		ans1 = int(solve1(N, A).split()[0])
		print(ans, ans1)
		assert ans == ans1
	exit()
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
TC = 1
for tc in range(1, TC + 1):
	(N,) = [int(x) for x in input().split()]
	A = [int(x) for x in input().split()]
	ans = solve(N, A)
	print(ans)


I = input
IN = lambda x: map(int, x.split())
L = lambda x: list(IN(x))
n = int(I())
a = L(I())

def find(a, n):
	s = sum(a)
	if s % 2 == 1:
		print(0)
		return
	t = 1
	for i in a:
		t |= t << i
	if t & 1 << s // 2:
		pass
	else:
		print(0)
		return
	z = 0
	p = 1024
	for i in range(n):
		t = a[i] & -a[i]
		if t < p:
			z = i
			p = t
			if p == 1:
				break
	print(1)
	print(z + 1)
find(a, n)


import os
import sys
from io import BytesIO, IOBase
from collections import Counter
import math as mt
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)
mod = int(1000000000.0) + 7

def power(k, n):
	if n == 0:
		return 1
	if n % 2:
		return power(k, n - 1) * k % mod
	t = power(k, n // 2)
	return t * t % mod

def totalPrimeFactors(n):
	count = 0
	if n % 2 == 0:
		count += 1
		while n % 2 == 0:
			n //= 2
	i = 3
	while i * i <= n:
		if n % i == 0:
			count += 1
			while n % i == 0:
				n //= i
		i += 2
	if n > 2:
		count += 1
	return count

def main():
	n = int(input())
	arr = list(map(int, input().split()))
	k = sum(arr)
	if k % 2:
		print(0)
	else:
		Sum = k
		part = [0 for i in range(Sum // 2 + 1)]
		for i in range(n):
			for j in range(Sum // 2, arr[i] - 1, -1):
				if part[j - arr[i]] == 1 or j == arr[i]:
					part[j] = 1
		if part[Sum // 2] != 1:
			print(0)
		else:
			for i in range(n):
				if arr[i] % 2 == 1 or part[Sum // 2 - arr[i] // 2] == 0:
					f = i + 1
					break
			print(1)
			print(f)
	return
main()


import sys

def I():
	return int(sys.stdin.readline().rstrip())

def MI():
	return map(int, sys.stdin.readline().rstrip().split())

def LI():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def LI2():
	return list(map(int, sys.stdin.readline().rstrip()))

def S():
	return sys.stdin.readline().rstrip()

def LS():
	return list(sys.stdin.readline().rstrip().split())

def LS2():
	return list(sys.stdin.readline().rstrip())
n = I()
A = LI()
X = []
for a in A:
	x = a
	count = 0
	while x % 2 == 0:
		x //= 2
		count += 1
	X.append(count)
m = min(X)
for i in range(n):
	A[i] //= 2 ** m
s = sum(A)
if s % 2 == 1:
	print(0)
	exit()
dp = [[0] * (s // 2 + 1) for _ in range(n + 1)]
dp[0][0] = 1
for i in range(1, n + 1):
	a = A[i - 1]
	for j in range(s // 2 + 1):
		if dp[i - 1][j]:
			dp[i][j] = 1
		if j >= a and dp[i - 1][j - a]:
			dp[i][j] = 1
if dp[-1][-1]:
	print(1)
	for i in range(n):
		if A[i] % 2 == 1:
			print(i + 1)
			break
else:
	print(0)