module queue
  implicit none
  type :: JagArray
    integer,allocatable :: array(:)
  end type JagArray
  contains
  subroutine push(A,b)
    integer,allocatable,dimension(:)::A
    integer::b
    A=[A,b]
  end subroutine
  subroutine pop(A)
  	integer,allocatable,dimension(:)::A
    A=A(2:)
  end subroutine
end module queue

use queue
integer N
integer,allocatable,dimension(:)::A,C
integer presum
read*,N
allocate(A(N))
read*,A
C=[integer::]
do i=n,1,-1
  if(mod(A(i),2)/=0)then
    c=[i,c]
    do j=1,i
      if(mod(i,j)==0)then
        A(j)=A(j)+1
      endif
      if(j*j>i)exit
    end do
  endif
end do
print"(I0)",size(c)
do i=1,size(c)
  if(i==1)then
  write(*,'(i0)', advance='no')c(i)
  else
  write(*,'(x,i0)', advance='no')c(i)
  endif
end do
end