#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
int c, d, i, j, n, m, k;
int a[100001], b[100001];
long long ca[100001], cb[100001];
long long mn[1000001], add[1000001];
bool good[100001];
void update(int l, int r, int a, int b, long long val, int num) {
  if (l == a && b == r - 1) {
    add[num] += val;
    return;
  }
  int xx = (r + l) / 2;
  if (b < xx)
    update(l, xx, a, b, val, num * 2);
  else if (a >= xx)
    update(xx, r, a, b, val, num * 2 + 1);
  else {
    update(l, xx, a, xx - 1, val, num * 2);
    update(xx, r, xx, b, val, num * 2 + 1);
  }
  mn[num] = min(mn[num * 2] + add[num * 2], mn[num * 2 + 1] + add[num * 2 + 1]);
}
long long fnd(int l, int r, int a, int b, int num) {
  if (l == a && b == r - 1) return mn[num] + add[num];
  int xx = (r + l) / 2;
  if (b < xx)
    return fnd(l, xx, a, b, num * 2) + add[num];
  else if (a >= xx)
    return fnd(xx, r, a, b, num * 2 + 1) + add[num];
  else
    return min(fnd(l, xx, a, xx - 1, num * 2), fnd(xx, r, xx, b, num * 2 + 1)) +
           add[num];
}
inline void solve() {
  memset((mn), 0, sizeof(mn));
  memset((add), 0, sizeof(add));
  for (int _n((n)-1), i(0); i <= _n; i++) {
    ca[i] = a[i];
    cb[i] = b[i];
    if (!i) continue;
    ca[i] += ca[i - 1];
    cb[i] += cb[i - 1];
  }
  for (int _n((n)-1), i(0); i <= _n; i++) {
    update(0, n, i, i, ca[i] - cb[i], 1);
  }
  for (int _n((n)-1), i(0); i <= _n; i++) {
    bool ok = 1;
    long long o = fnd(0, n, 0, n - 1, 1);
    if (o < 0) ok = 0;
    update(0, n, 0, n - 1, -(a[i] - b[i]), 1);
    o = fnd(0, n, i, i, 1);
    update(0, n, i, i, -o, 1);
    if (ok) good[i] = 1;
  }
}
int main() {
  scanf("%d", &n);
  for (int _n((n)-1), i(0); i <= _n; i++) scanf("%d", &a[i]);
  for (int _n((n)-1), i(0); i <= _n; i++) scanf("%d", &b[i]);
  reverse(a, a + n);
  reverse(b, b + n);
  rotate(b, b + 1, b + n);
  solve();
  reverse(a, a + n);
  rotate(b, b + n - 1, b + n);
  reverse(b, b + n);
  reverse(good, good + n);
  solve();
  c = 0;
  for (int _n((n)-1), i(0); i <= _n; i++) c += good[i];
  printf("%d\n", c);
  c = 0;
  for (int _n((n)-1), i(0); i <= _n; i++) {
    if (!good[i]) continue;
    if (!c)
      c = 1;
    else
      printf(" ");
    printf("%d", i + 1);
  }
  printf("\n");
}
