#include <bits/stdc++.h>
using namespace std;
bool vis[200010];
int a[200010], b[200010], s[200010];
struct node {
  int add, val;
};
node tree[200010 << 2];
inline void pushUp(int rt) {
  tree[rt].val = min(tree[rt << 1].val, tree[rt << 1 | 1].val);
}
void build(int L, int R, int rt) {
  tree[rt].add = 0;
  if (L == R)
    tree[rt].val = s[L];
  else {
    int mid = (L + R) >> 1;
    build(L, mid, rt << 1);
    build(mid + 1, R, rt << 1 | 1);
    pushUp(rt);
  }
}
inline void pushDown(int rt) {
  if (tree[rt].add) {
    tree[rt << 1].add += tree[rt].add;
    tree[rt << 1 | 1].add += tree[rt].add;
    tree[rt << 1].val += tree[rt].add;
    tree[rt << 1 | 1].val += tree[rt].add;
    tree[rt].add = 0;
  }
}
int query(int x, int y, int L, int R, int rt) {
  if (x <= L && R <= y) return tree[rt].val;
  int mid = (L + R) >> 1, ans = 0x7FFFFFFF;
  pushDown(rt);
  if (x <= mid) ans = min(ans, query(x, y, L, mid, rt << 1));
  if (y > mid) ans = min(ans, query(x, y, mid + 1, R, rt << 1 | 1));
  return ans;
}
void update(int x, int y, int val, int L, int R, int rt) {
  if (x <= L && R <= y) {
    tree[rt].val += val;
    tree[rt].add += val;
  } else {
    int mid = (L + R) >> 1;
    pushDown(rt);
    if (x <= mid) update(x, y, val, L, mid, rt << 1);
    if (y > mid) update(x, y, val, mid + 1, R, rt << 1 | 1);
    pushUp(rt);
  }
}
void gao(int n, bool flag) {
  int i, cnt;
  s[0] = 0;
  cnt = n << 1;
  for (i = 1; i < cnt; i++) s[i] = s[i - 1] + a[i] - b[i];
  build(1, cnt - 1, 1);
  for (i = 1; i <= n; i++) {
    if (query(i, i + n - 1, 1, cnt - 1, 1) >= 0) {
      if (flag)
        vis[i] = true;
      else
        vis[n - i + 1] = true;
    }
    update(i + 1, cnt - 1, b[i] - a[i], 1, cnt - 1, 1);
  }
}
int main() {
  int n, i, cnt;
  while (~scanf("%d", &n)) {
    memset(vis, false, sizeof(vis));
    for (i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      a[i + n] = a[i];
    }
    for (i = 1; i <= n; i++) {
      scanf("%d", &b[i]);
      b[i + n] = b[i];
    }
    gao(n, true);
    reverse(a + 1, a + 1 + 2 * n);
    reverse(b + 1, b + 1 + 2 * n);
    rotate(b + 1, b + 2, b + 1 + 2 * n);
    gao(n, false);
    cnt = 0;
    for (i = 1; i <= n; i++) {
      if (vis[i]) cnt++;
    }
    printf("%d\n", cnt);
    for (i = 1; i <= n; i++) {
      if (vis[i]) printf("%d ", i);
    }
    putchar('\n');
  }
  return 0;
}
