# include <bits/stdc++.h>
using namespace std;
# define vi vector < int >
# define pb push_back
int a[1 << 20];
int b[1 << 20];
int p[1 << 20];
int main(void)
{
int n;
scanf("%d",&n);
for (int i = 1;i <= n;++i)
scanf("%d",&a[i]);
for (int i = 1;i <= n;++i)
scanf("%d",&b[i]);
for (int i = 1;i <= n;++i)
p[i] = i;
sort(p + 1,p + 1 + n,[&](int xx,int yy) {return a[xx] > a[yy];});
vi answer;
answer.pb(p[1]);
for (int i = 2;i <= n;i += 2)
{
int bst = p[i];
if (i + 1 <= n && b[p[i + 1]] > b[bst])
bst = p[i + 1];
answer.pb(bst);
}
int sz = answer.size();
printf("%d\n",sz);
for (int i = 0;i < sz;++i)
printf("%d%c",answer[i]," \n"[i == sz - 1]);
cerr << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms" << '\n';
return 0;
}
IyBpbmNsdWRlIDxiaXRzL3N0ZGMrKy5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwojIGRlZmluZSB2aSB2ZWN0b3IgPCBpbnQgPgojIGRlZmluZSBwYiBwdXNoX2JhY2sKaW50IGFbMSA8PCAyMF07CmludCBiWzEgPDwgMjBdOwppbnQgcFsxIDw8IDIwXTsKaW50IG1haW4odm9pZCkKewogICAgaW50IG47CiAgICBzY2FuZigiJWQiLCZuKTsKICAgIGZvciAoaW50IGkgPSAxO2kgPD0gbjsrK2kpCiAgICAgICAgc2NhbmYoIiVkIiwmYVtpXSk7CiAgICBmb3IgKGludCBpID0gMTtpIDw9IG47KytpKQogICAgICAgIHNjYW5mKCIlZCIsJmJbaV0pOwogICAgZm9yIChpbnQgaSA9IDE7aSA8PSBuOysraSkKICAgICAgICBwW2ldID0gaTsKICAgIHNvcnQocCArIDEscCArIDEgKyBuLFsmXShpbnQgeHgsaW50IHl5KSB7cmV0dXJuIGFbeHhdID4gYVt5eV07fSk7CiAgICB2aSBhbnN3ZXI7CiAgICBhbnN3ZXIucGIocFsxXSk7CiAgICBmb3IgKGludCBpID0gMjtpIDw9IG47aSArPSAyKQogICAgewogICAgICAgIGludCBic3QgPSBwW2ldOwogICAgICAgIGlmIChpICsgMSA8PSBuICYmIGJbcFtpICsgMV1dID4gYltic3RdKQogICAgICAgICAgICBic3QgPSBwW2kgKyAxXTsKICAgICAgICBhbnN3ZXIucGIoYnN0KTsKICAgIH0KICAgIGludCBzeiA9IGFuc3dlci5zaXplKCk7CiAgICBwcmludGYoIiVkXG4iLHN6KTsKICAgIGZvciAoaW50IGkgPSAwO2kgPCBzejsrK2kpCiAgICAgICAgcHJpbnRmKCIlZCVjIixhbnN3ZXJbaV0sIiBcbiJbaSA9PSBzeiAtIDFdKTsKICAgIGNlcnIgPDwgIlRpbWUgZWxhcHNlZCA6IiA8PCBjbG9jaygpICogMTAwMC4wIC8gQ0xPQ0tTX1BFUl9TRUMgPDwgIiBtcyIgPDwgJ1xuJzsKICAgIHJldHVybiAwOwp9Cg==