#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100;
int N;
pair<pair<int, int>, int> A[MAXN];
int ans[MAXN];
int main() {
  ios::sync_with_stdio(0);
  cin >> N;
  for (int i = 1; i <= N; i++) {
    cin >> A[i].first.first;
    A[i].second = i;
  }
  for (int i = 1; i <= N; i++) cin >> A[i].first.second;
  sort(A + 1, A + N + 1);
  ans[0] = A[N].second;
  for (int i = N - 2, j = 1; i >= 1; i -= 2, j++) {
    if (A[i + 1].first.second > A[i].first.second)
      ans[j] = A[i + 1].second;
    else
      ans[j] = A[i].second;
  }
  if (N % 2 == 0) ans[N / 2] = A[1].second;
  cout << N / 2 + 1 << "\n";
  for (int i = 0; i < N / 2 + 1; i++) cout << ans[i] << " ";
  cout << "\n";
  return 0;
}
