#include <bits/stdc++.h>
using namespace std;
const int MaxN = 100005, MaxC = 0x3F3F3F3F, NA = -1;
int a[MaxN], b[MaxN];
bool d[MaxN], e[MaxN];
int n;
void solve(bool* d) {
  int c, i, u;
  u = MaxC;
  c = 0;
  for (i = 0; i < n; i++) {
    u = min(u, c);
    c += a[i] - b[i];
  }
  assert(c == 0);
  for (i = 0; i < n; i++) {
    d[i] = (c == u);
    c += a[i] - b[i];
  }
}
int main(void) {
  int i, k;
  while (scanf(" %d", &n) != EOF) {
    for (i = 0; i < n; i++) scanf(" %d", &a[i]);
    for (i = 0; i < n; i++) scanf(" %d", &b[i]);
    memset(d, 0, sizeof(d));
    solve(d);
    reverse(a, a + n);
    reverse(b, b + n - 1);
    memset(e, 0, sizeof(e));
    solve(e);
    reverse(e, e + n);
    for (i = 0; i < n; i++) d[i] |= e[i];
    k = 0;
    for (i = 0; i < n; i++)
      if (d[i]) k++;
    printf("%d\n", k);
    for (i = 0; i < n; i++)
      if (d[i]) {
        k--;
        printf("%d%c", i + 1, k > 0 ? ' ' : '\n');
      }
  }
  return 0;
}
