#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int n, a[maxn], b[maxn];
vector<pair<int, int> > c;
vector<int> p;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    scanf("%d", &a[i]), c.push_back(pair<int, int>(a[i], i));
  for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
  sort(c.rbegin(), c.rend());
  p.push_back(c[0].second);
  for (int i = 1; i < c.size(); i += 2) {
    int t = c[i].second, tt = (i + 1 >= c.size() ? 0 : c[i + 1].second);
    p.push_back(b[t] > b[tt] ? t : tt);
  }
  printf("%d\n", p.size());
  for (int i = 0; i < p.size(); i++) printf("%d ", p[i]);
  return 0;
}
