#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 9;
int n;
pair<int, pair<int, int> > a[N];
vector<int> ans;
void solve() {
  for (int i = 0; i < n; i += 2) {
    if (a[i].second.first > a[i + 1].second.first)
      ans.push_back(a[i].second.second);
    else
      ans.push_back(a[i + 1].second.second);
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i].first);
    ;
    a[i].second.second = i + 1;
  }
  for (int i = 0; i < n; i++) scanf("%d", &a[i].second);
  ;
  sort(a, a + n);
  ans.push_back(a[n - 1].second.second);
  n--;
  if (n % 2 == 1) ans.push_back(a[n - 1].second.second), n--;
  solve();
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
}
