#include<cstdio>
const int N=2e5+10;
int n,a[N],ans,sum[N];
long long f[N];
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
		scanf("%d",&a[i]);
	for(int i=n;i>=1;i--)
	{
		f[i]=a[i];
		for(int j=2*i;j<=n;j+=i)f[i]+=f[j]; 
		if(f[i]%2)sum[++ans]=i;
	}
	printf("%d\n",ans);
	for(int i=1;i<=ans;i++)
		printf("%d ",sum[i]);
	return 0;
}
