#include <bits/stdc++.h>
using namespace std;
struct P {
  int id;
  int x, y;
} p[123456];
bool cmp(P a, P b) { return a.x > b.x; }
int main() {
  int t, i, n;
  cin >> n;
  for (i = 1; i <= n; i++) {
    p[i].id = i;
    cin >> p[i].x;
  }
  for (i = 1; i <= n; i++) {
    cin >> p[i].y;
  }
  sort(p + 1, p + n + 1, cmp);
  int a[123456] = {0}, k = 0;
  if (n % 2) {
    a[k++] = p[1].id;
    for (i = 2; i <= n; i += 2) {
      if (p[i].y >= p[i + 1].y) {
        a[k++] = p[i].id;
      } else
        a[k++] = p[i + 1].id;
    }
  } else {
    a[k++] = p[1].id;
    for (i = 2; i < n; i += 2) {
      if (p[i].y >= p[i + 1].y) {
        a[k++] = p[i].id;
      } else
        a[k++] = p[i + 1].id;
    }
    a[k++] = p[n].id;
  }
  printf("%d\n", k);
  for (i = 0; i < k - 1; i++) printf("%d ", a[i]);
  printf("%d\n", a[k - 1]);
}
