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.
n=int(input())
A=list(map(int,input().split()))

i=n-1
while i>=0:
    if A[i]==1:
        s=i
        break
    i-=1

if i==-1:
    print(0)
elif s==0:
    print(1)
else:
    i=int((s+1)**0.5)
    while i>=0:
        B=[A[j] for j in range(i+1,n,i+1)]
        r=sum(B[1:])
        if r%2==0:
            A[i]=1
        else:
            A[i]=0
        i-=1
    C=[m for m,k in enumerate(A,1) if k!=0]
    print(len(C))
    print(*C)
n=int(input())
A=list(map(int,input().split()))

i=n-1
while i>=0:
    if A[i]==1:
        s=i
        break
    i-=1

if i==-1:
    print(0)
elif s==0:
    print(1)
    print(1)
else:
    i=(s+1)//2-1
    while i>=0:
        B=[A[j] for j in range(i,n,i+1)]
        r=sum(B[1:])
        if r%2==0 and A[i]==0:
            A[i]=0
        elif r%2==0 and A[i]==1:
            A[i]=1
        elif r%2==1 and A[i]==0:
            A[i]=1
        else:
            A[i]=0
        i-=1
    C=[m for m,k in enumerate(A,1) if k!=0]
    print(len(C))
    print(*C)