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())
good_pattern = [int(i) for i in input().split()]
finder = False

for i in range(2 ** N):
  pattern = [int(i) for i in list(format(i,'b').zfill(N))]
  judge_arr = []
  for j in range(N):
    multiple_list = [a for a in range(N+1) if a % (j+1) == 0][1:]
    sums = 0
    for k in multiple_list:
      sums += pattern[k-1]
      
    judge = sums%2
    judge_arr.append(judge)
  print(judge_arr)
    
  if judge_arr == good_pattern:
    finder = True 
    break

if finder:
  print("Yes")

else:
  print(-1)
  
N = int(input())
mod_arr = list(map(int,input().split()))
arr = [0]*N
in_arr = []

for i in range(N,0,-1):
  if i > N//2:
    if mod_arr[i-1] == 0:
      continue
    else:
      arr[i-1] = 1
      in_arr.append(str(i))
      
  else:
    S = 0
    for j in range(2*i,N+1,i):
      S += arr[j-1]
    if S%2 == mod_arr[i-1]:
      arr[i-1] = 0
    else:
      arr[i-1] = 1
      in_arr.append(str(i))

print(len(in_arr))
print(' '.join(in_arr))