#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int n;
pair<pair<int, int>, int> ab[maxn];
vector<int> P;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> ab[i].first.first;
  for (int i = 0; i < n; ++i) cin >> ab[i].first.second;
  for (int i = 0; i < n; ++i) ab[i].second = i + 1;
  sort(ab, ab + n);
  cerr << endl;
  for (int i = 0; i < n; ++i) cerr << ab[i].first.first << ' ';
  cerr << endl;
  for (int i = 0; i < n; ++i) cerr << ab[i].first.second << ' ';
  cerr << endl;
  for (int i = 0; i < n; ++i) cerr << ab[i].second << ' ';
  cerr << endl;
  for (int i = 0; i < n; i += 2) {
    if (i == n - 1)
      P.push_back(ab[i].second);
    else if (i == n - 2)
      P.push_back(ab[i].second), P.push_back(ab[i + 1].second);
    else
      P.push_back(ab[i].first.second > ab[i + 1].first.second
                      ? ab[i].second
                      : ab[i + 1].second);
  }
  cout << P.size() << '\n';
  for (int i : P) cout << i << ' ';
  return 0;
}
