#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
int n, ans[MAXN], now;
int Read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c > '9' || c < '0') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x * 10) + (c ^ 48);
    c = getchar();
  }
  return x * f;
}
void Put1(int x) {
  if (x > 9) Put1(x / 10);
  putchar(x % 10 ^ 48);
}
void Put(int x, char c = -1) {
  if (x < 0) putchar('-'), x = -x;
  Put1(x);
  if (c >= 0) putchar(c);
}
template <typename T>
T Max(T x, T y) {
  return x > y ? x : y;
}
template <typename T>
T Min(T x, T y) {
  return x < y ? x : y;
}
template <typename T>
T Abs(T x) {
  return x < 0 ? -x : x;
}
struct node {
  int a, b, ID;
  bool operator<(const node &px) const { return a > px.a; }
} s[MAXN];
int main() {
  n = Read();
  for (int i = 1; i <= n; ++i) s[i].a = Read(), s[i].ID = i;
  for (int i = 1; i <= n; ++i) s[i].b = Read();
  sort(s + 1, s + n + 1);
  Put(n / 2 + 1, '\n');
  if (n & 1) {
    ans[++now] = s[1].ID;
    for (int i = 2; i <= n; i += 2) {
      if (s[i].b < s[i + 1].b)
        ans[++now] = s[i + 1].ID;
      else
        ans[++now] = s[i].ID;
    }
  } else {
    ans[++now] = s[1].ID;
    ans[++now] = s[2].ID;
    for (int i = 3; i <= n; i += 2) {
      if (s[i].b < s[i + 1].b)
        ans[++now] = s[i + 1].ID;
      else
        ans[++now] = s[i].ID;
    }
  }
  sort(ans + 1, ans + now + 1);
  for (int i = 1; i <= now; ++i) Put(ans[i], i == n ? -1 : ' ');
  return 0;
}
