#include <bits/stdc++.h>
using namespace std;
const int seed = 131;
const int maxn = 1e5 + 5;
const int mod = 998244353;
int n;
struct node {
  int num, id;
} a[maxn];
int b[maxn];
bool cmp(node a, node b) { return a.num > b.num; }
vector<int> v;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i].num);
    a[i].id = i;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &b[i]);
  }
  sort(a + 1, a + 1 + n, cmp);
  v.push_back(a[1].id);
  for (int i = 2; i <= n; i += 2) {
    if (i == n) {
      v.push_back(a[i].id);
      break;
    }
    if (b[a[i].id] > b[a[i + 1].id])
      v.push_back(a[i].id);
    else
      v.push_back(a[i + 1].id);
  }
  printf("%d\n", v.size());
  for (int i = 0; i < v.size(); i++) printf("%d ", v[i]);
  return 0;
}
