#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:64000000")
template <class T>
inline T sqr(T x) {
  return x * x;
}
struct RMQ {
  int n;
  long long tr[1 << 19];
  long long val[1 << 19];
  RMQ() {
    n = 0;
    clear();
  }
  void clear() {
    memset(tr, 0, sizeof tr);
    memset(val, 0, sizeof val);
  }
  void build(long long *a, int i, int l, int r) {
    if (l == r)
      tr[i] = a[l];
    else {
      int m = (l + r) >> 1;
      build(a, 2 * i + 1, l, m);
      build(a, 2 * i + 2, m + 1, r);
      tr[i] = min(tr[2 * i + 1], tr[2 * i + 2]);
    }
  }
  void update(int L, int R, long long dx, int i, int l, int r) {
    if (l == L && r == R)
      tr[i] += dx, val[i] += dx;
    else {
      int m = (l + r) >> 1;
      if (R <= m)
        update(L, R, dx, 2 * i + 1, l, m);
      else if (m < L)
        update(L, R, dx, 2 * i + 2, m + 1, r);
      else
        update(L, m, dx, 2 * i + 1, l, m),
            update(m + 1, R, dx, 2 * i + 2, m + 1, r);
      tr[i] = min(tr[2 * i + 1], tr[2 * i + 2]) + val[i];
    }
  }
  void update(int L, int R, long long dx) { update(L, R, dx, 0, 0, n - 1); }
  long long get(int L, int R, int i, int l, int r) {
    if (l == L && r == R) return tr[i];
    int m = (l + r) >> 1;
    if (R <= m) return get(L, R, 2 * i + 1, l, m) + val[i];
    if (m < L) return get(L, R, 2 * i + 2, m + 1, r) + val[i];
    return min(get(L, m, 2 * i + 1, l, m), get(m + 1, R, 2 * i + 2, m + 1, r)) +
           val[i];
  }
  long long get(int L, int R) { return get(L, R, 0, 0, n - 1); }
};
int n;
int a[1 << 17];
int b[1 << 17];
long long sum[1 << 17];
int an = 0;
char ans[1 << 17];
RMQ rmq;
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]);
  for (int it = 0; it < 2; ++it) {
    sum[0] = a[0] - b[0];
    for (int i = 1; i < n; ++i) sum[i] = sum[i - 1] + a[i] - b[i];
    long long total = sum[n - 1];
    rmq.n = n;
    rmq.clear();
    rmq.build(sum, 0, 0, n - 1);
    for (int i = 0; i < n; ++i) {
      if (rmq.get(0, n - 1) >= 0)
        if (it == 0)
          ans[i] = true;
        else
          ans[n - i - 1] = true;
      rmq.update(0, n - 1, -a[i] + b[i]);
      rmq.update(i, i, total);
    }
    if (it) break;
    reverse(a, a + n);
    reverse(b, b + n);
    rotate(b, b + 1, b + n);
  }
  int res = 0;
  for (int i = 0; i < n; ++i)
    if (ans[i]) ++res;
  printf("%d\n", res);
  for (int i = 0; i < n; ++i)
    if (ans[i]) printf("%d ", i + 1);
  return 0;
}
