#include <bits/stdc++.h>
using namespace std;
const int x = 1e5 + 5;
struct s {
  int bian;
  int ji;
} a[x];
int b[x];
int cmp(s x, s y) { return x.ji > y.ji; }
set<int> daan;
set<int>::iterator it;
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].ji;
    a[i].bian = i;
  }
  for (int i = 1; i <= n; i++) {
    cin >> b[i];
  }
  sort(a + 1, a + n + 1, cmp);
  if (n & 1) {
    daan.insert(a[1].bian);
    for (int i = 2; i <= n; i += 2) {
      if (b[a[i].bian] >= b[a[i + 1].bian]) {
        daan.insert(a[i].bian);
      } else {
        daan.insert(a[i + 1].bian);
      }
    }
  } else {
    daan.insert(a[1].bian);
    daan.insert(a[2].bian);
    for (int i = 3; i <= n; i += 2) {
      if (b[a[i].bian] >= b[a[i + 1].bian]) {
        daan.insert(a[i].bian);
      } else {
        daan.insert(a[i + 1].bian);
      }
    }
  }
  cout << daan.size() << endl;
  for (it = daan.begin(); it != daan.end(); it++) {
    cout << *it << " ";
  }
  cout << endl;
  return 0;
}
