#include <bits/stdc++.h>
using namespace std;
typedef struct node {
  int p, x;
} node;
bool cmp(const node x, const node y) { return x.x > y.x; }
const int maxn = 1e5 + 5;
node a[maxn], b[maxn];
int c[maxn];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i].x), a[i].p = i;
  for (int i = 1; i <= n; ++i) scanf("%d", &b[i].x), b[i].p = i;
  int t = 0;
  sort(a + 1, a + n + 1, cmp);
  c[t++] = a[1].p;
  for (int i = 2; i <= n; i += 2) {
    if (i == n)
      c[t++] = a[n].p;
    else {
      if (b[a[i].p].x > b[a[i + 1].p].x)
        c[t++] = a[i].p;
      else
        c[t++] = a[i + 1].p;
    }
  }
  printf("%d\n", t);
  for (int i = 0; i < t; ++i) printf("%d ", c[i]);
  printf("\n");
  return 0;
}
