#include <bits/stdc++.h>
using namespace std;
int n;
long long a[200000], b[200000], c[200000];
bool used[200000];
struct tree {
  int tl, tr;
  long long key;
  tree *l, *r;
  tree(){};
  tree(int _tl, int _tr) : tl(_tl), tr(_tr), l(0), r(0), key(0){};
} * T, *I;
typedef tree *node;
void build(node &t) {
  if (t->tl == t->tr)
    t->key = c[t->tl];
  else {
    t->l = new tree(t->tl, (t->tl + t->tr) / 2);
    t->r = new tree((t->tl + t->tr) / 2 + 1, t->tr);
    build(t->l);
    build(t->r);
    t->key = min(t->l->key, t->r->key);
  };
};
long long min_query(node t, int L, int R) {
  if (L > R) return 2e18;
  if (t->tl == L && t->tr == R) return t->key;
  int mid = (t->tl + t->tr) / 2;
  if (R <= mid) return min_query(t->l, L, R);
  if (L > mid) return min_query(t->r, L, R);
  return min(min_query(t->l, L, mid), min_query(t->r, mid + 1, R));
};
int main() {
  scanf("%d", &n);
  T = new tree(1, n);
  for (int i = 1; i <= n; i++) scanf("%I64d", &a[i]);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &b[i]);
    c[i] = a[i] - b[i];
  };
  for (int i = 1; i <= n; i++) c[i] += c[i - 1];
  build(T);
  for (int i = 1; i <= n; i++)
    if (min_query(T, i, n) - c[i - 1] >= 0 &&
        min_query(T, 1, i - 1) + c[n] - c[i - 1] >= 0)
      used[i] = true;
  reverse(a + 1, a + n + 1);
  reverse(b + 1, b + n + 1);
  for (int i = 1; i <= n; i++) b[i - 1] = b[i];
  b[n] = b[0];
  b[0] = 0;
  for (int i = 1; i <= n; i++) c[i] = a[i] - b[i];
  for (int i = 1; i <= n; i++) c[i] += c[i - 1];
  I = new tree(1, n);
  build(I);
  for (int i = 1; i <= n; i++)
    if (min_query(I, i, n) - c[i - 1] >= 0 &&
        min_query(I, 1, i - 1) + c[n] - c[i - 1] >= 0)
      used[n - i + 1] = true;
  int cnt = 0;
  for (int i = 1; i <= n; i++) cnt += used[i];
  printf("%d\n", cnt);
  for (int i = 1; i <= n; i++)
    if (used[i]) printf("%d ", i);
  return 0;
}
