#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  while (cin >> n) {
    vector<tuple<int, int, int> > t(n);
    vector<int> a(n), b(n);
    for (int(i) = (0); (i) < (int)(n); ++(i)) cin >> a[i];
    for (int(i) = (0); (i) < (int)(n); ++(i)) cin >> b[i];
    for (int(i) = (0); (i) < (int)(n); ++(i)) {
      t[i] = make_tuple(a[i], b[i], i + 1);
    }
    sort(t.rbegin(), t.rend());
    vector<int> ans{get<2>(t[0])};
    for (int i = 1; i < n - 1; i += 2) {
      int x, y, z, w, p, q;
      tie(x, y, p) = t[i];
      tie(z, w, q) = t[i + 1];
      ans.push_back(y >= w ? p : q);
    }
    if (n % 2 == 0) {
      ans.push_back(get<2>(t.back()));
    }
    int m = (int)(ans).size();
    cout << m << endl;
    for (int(i) = (0); (i) < (int)(m); ++(i))
      cout << ans[i] << (i != m - 1 ? ' ' : '\n');
  }
}
