There are N empty boxes arranged in a row from left to right. The integer i is written on the i-th box from the left (1 \leq i \leq N).  For each of these boxes, Snuke can choose either to put a ball in it or to put nothing in it.  We say a set of choices to put a ball or not in the boxes is good when the following condition is satisfied:    * For every integer i between 1 and N (inclusive), the total number of balls contained in the boxes with multiples of i written on them is congruent to a_i modulo 2.  Does there exist a good set of choices? If the answer is yes, find one good set of choices.
from math import ceil
n = int(input())
a = list(map(int, input().split()))

box = [0]*n
for i in range(2, n):
    for j in range(n//(i-1), n//i, -1):
        box[j-1] = a[j-1]
        for k in range(1, i):
            box[j-1] -= a[j*k-1]
        if box[j-1]<0:
            print(-1)
            exit()
box[0] = sum(a)
print(*box)
n, *a = map(int, open(0).read().split())

ans = [0] * n
for i in range(n-1, -1, -1):
    cnt = 0
    for j in range(i+1, n+1, i+1): cnt += ans[j-1]
    if cnt%2!=a[i]: ans[i] = 1

print(sum(ans))
for i in range(n):
    if ans[i]: print(i+1)