#include <bits/stdc++.h>
using namespace std;
const int MN = 1000 * 100 + 1000;
bool mark[MN];
int a[MN];
int b[MN];
int mx = -1, p = -1;
vector<int> sol;
int n;
int dis(int a, int mb) {
  if (a > mb) return dis(mb, a);
  if (a == 0) {
    if (mb == 1) return b[0];
    return b[n - 1];
  }
  return b[a];
}
void add(int a) {
  if (mark[a]) return;
  mark[a] = 1;
  sol.push_back(a);
}
int findp1() {
  int last = 0;
  int now = a[0];
  for (int i = 1; i < n; i++) {
    if (now < b[i - 1]) {
      now = a[i];
      last = i;
      continue;
    }
    now -= b[i - 1];
    now += a[i];
  }
  return last;
}
int findp2() {
  int last = n - 1;
  int now = a[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    if (now < b[i]) {
      now = a[i];
      last = i;
      continue;
    }
    now -= b[i];
    now += a[i];
  }
  return last;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 0; i < n; i++) scanf("%d", &b[i]);
  int need = 0;
  p = findp2();
  add(p);
  for (int i = (p + 1) % n; i != p; i = (i + 1) % n) {
    int last = (i - 1);
    if (last < 0) last += n;
    int tmp = need + dis(i, last) - a[i];
    if (tmp < 0) tmp = 0;
    if (tmp == 0) add(i);
    need = tmp;
  }
  need = 0;
  p = findp1();
  add(p);
  for (int i = (((p - 1) % n) + n) % n; i != p; i = (((i - 1) % n) + n) % n) {
    int last = (i + 1) % n;
    int tmp = need + dis(i, last) - a[i];
    if (tmp < 0) tmp = 0;
    if (tmp == 0) add(i);
    need = tmp;
  }
  sort(sol.begin(), sol.end());
  printf("%d\n", sol.size());
  for (int i = 0; i < sol.size(); i++) printf("%d ", sol[i] + 1);
  printf("\n");
  return 0;
}
