#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100007;
const int oo = 0x3f3f3f3f;
const long long loo = 4223372036854775807ll;
const long long mod = 1e9 + 7;
struct Fuck {
  int num;
  int k;
  Fuck() {}
  Fuck(int _a, int _b) {
    num = _a;
    k = _b;
  }
  bool operator<(const Fuck &t) const { return num > t.num; }
} f[MAXN];
int b[MAXN];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  int n;
  while (cin >> n) {
    for (int i = 0; i < n; i++) {
      cin >> f[i].num;
      f[i].k = i + 1;
    }
    for (int i = 1; i <= n; i++) {
      cin >> b[i];
    }
    sort(f, f + n);
    vector<int> vec;
    vec.push_back(f[0].k);
    for (int i = 1; i < n; i += 2) {
      if (n % 2 == 0 && i == n - 1) {
        vec.push_back(f[i].k);
        continue;
      }
      if (b[f[i].k] > b[f[i + 1].k])
        vec.push_back(f[i].k);
      else
        vec.push_back(f[i + 1].k);
    }
    cout << vec.size() << endl;
    for (int i = 0; i < vec.size(); i++) {
      cout << vec[i];
      if (i == vec.size() - 1)
        cout << '\n';
      else
        cout << ' ';
    }
  }
  return 0;
}
