#include <bits/stdc++.h>
const long long INF = (long long)1e18 + 123;
const int inf = (int)2e9 + 123;
const int mod = 1e9 + 7;
using namespace std;
int n, a[100011], b[100011], c[100011];
vector<int> ans;
bool u[100011];
bool cmp(int x, int y) { return a[x] < a[y]; }
int main() {
  unsigned int FOR;
  asm("rdtsc" : "=A"(FOR));
  srand(FOR);
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    cin >> b[i];
    c[i] = i;
  }
  sort(c + 1, c + 1 + n, &cmp);
  for (int i = 1; i < n; i += 2) {
    if (b[c[i]] >= b[c[i + 1]]) {
      ans.push_back(c[i]);
      u[i] = 1;
    } else {
      u[i + 1] = 1;
      ans.push_back(c[i + 1]);
    }
  }
  for (int i = n; i >= 1; i--) {
    if (!u[i]) {
      ans.push_back(c[i]);
      break;
    }
  }
  cout << ans.size() << endl;
  for (int i = 1; i <= n / 2 + 1; i++) {
    cout << ans[i - 1] << " ";
  }
  return 0;
}
