#include <bits/stdc++.h>
using namespace std;
class node {
 public:
  int a, b;
  int idx;
};
int n;
node A[100100];
int visit[100100];
vector<int> vec;
int myfunc(node a, node b) {
  if (a.a > b.a) return 1;
  if (a.a < b.a) return 0;
  return a.b > b.b;
}
void cal() {
  int m = n / 2;
  m++;
  int k = n - m;
  sort(A + 1, A + n + 1, myfunc);
  vec.push_back(A[1].idx);
  visit[A[1].idx] = 1;
  int i = 2;
  while (k--) {
    if (A[i].b >= A[i + 1].b) {
      visit[A[i].idx] = 1;
      vec.push_back(A[i].idx);
      i += 2;
    } else {
      visit[A[i + 1].idx] = 1;
      vec.push_back(A[i + 1].idx);
      i += 2;
    }
  }
  if (n % 2 == 0) {
    vec.push_back(A[n].idx);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &A[i].a);
    A[i].idx = i;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &A[i].b);
  }
  cal();
  printf("%d\n", vec.size());
  for (int i = 0; i < vec.size(); i++) {
    printf("%d ", vec[i]);
  }
  printf("\n");
  return 0;
}
