#include<bits/stdc++.h>
using namespace std;
const int B=36,N=100+10;
typedef pair<int,bitset<N>> Pib;
int n,b;
Pib a[N],c[B+10];
mt19937 rnd(time(0));
void operator +=(Pib &x,Pib &y)
{
x.first+=y.first;
x.second|=y.second;
}
bool cmp(Pib &x,Pib &y)
{
return x.first<y.first;
}
Pib solve()
{
vector<Pib> p1,p2;
for(int i=1;i<=b;i++)
if(i<=b/2)p1.push_back(c[i]);
else p2.push_back(c[i]);
vector<Pib> archive;
for(int i=0;i<(1<<p1.size());i++)
{
Pib cur;
for(int j=0;j<p1.size();j++)
if(i&(1<<j))cur+=p1[j];
archive.push_back(cur);
}
sort(archive.begin(),archive.end(),cmp);
for(int i=0;i<(1<<p2.size());i++)
{
Pib cur;
for(int j=0;j<p2.size();j++)
if(i&(1<<j))cur+=p2[j];
int l=0,r=archive.size()-1,mid;
while(l<r)
{
mid=(l+r+1)>>1;
if(cur.first+archive[mid].first<=1e9)l=mid;
else r=mid-1;
}
auto res=cur;
res+=archive[l];
if(res.first==1e9)return res;
}
Pib any;
return any;
}
int main()
{
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>a[i].first;
a[i].second[i]=1;
}
Pib ans;
do
{
b=min(n,B);
for(int i=1;i<=b;i++)
{
int p=1,minv=1e9;
for(int j=1;j<=b;j++)
if(c[j].first<minv)
p=j,minv=c[j].first;
c[p]+=a[i];
}
ans=solve();
if(ans.first==1e9)
}while(1);
cout<<ans.second.count()<<" ";
for(int i=1;i<=n;i++)
if(ans.second[i])cout<<i<<" ";
return 0;
}