#include <bits/stdc++.h>
using namespace std;
bool was[100005];
vector<int> ans;
int main() {
  int i, n;
  cin >> n;
  pair<pair<int, int>, int> pa[n];
  for (i = 0; i < n; ++i) cin >> pa[i].first.first, pa[i].second = i + 1;
  for (i = 0; i < n; ++i) cin >> pa[i].first.second;
  sort(pa, pa + n);
  ans.push_back(pa[n - 1].second);
  for (i = n - 2; i > 0; i -= 2) {
    if (pa[i].first.second > pa[i - 1].first.second)
      ans.push_back(pa[i].second);
    else
      ans.push_back(pa[i - 1].second);
  }
  if (n % 2 == 0) ans.push_back(pa[0].second);
  int cnt = n / 2 + 1;
  cout << cnt << endl;
  for (i = 0; i < cnt; ++i) cout << ans[i] << " ";
}
