#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:32000000")
using namespace std;
const double pi = 3.1415926535897932384626433832795;
template <class T>
inline T Sqr(const T &x) {
  return x * x;
}
template <class T>
inline T Abs(const T &x) {
  return x >= 0 ? x : -x;
}
int n;
int a[200005], b[200005];
long long l[200005], r[200005], s[200005];
inline int prev(int x) { return x & (x - 1); }
inline int next(int x) { return 2 * x - prev(x); }
void init() {
  for (int i = 0; i < (n); i++) {
    l[i] = r[i] = s[i] = (1ll << 60);
  }
}
void modify(int p, long long x) {
  p++;
  s[p] = x;
  int t = p;
  while (t > 0) {
    r[t] = min(r[t], x);
    t = prev(t);
  }
  t = p;
  while (t < n) {
    l[t] = min(l[t], x);
    t = next(t);
  }
}
long long query(int left, int right) {
  left++;
  right++;
  long long res = (1ll << 60);
  int t = right;
  while (prev(t) >= left) {
    res = min(res, l[t]);
    t = prev(t);
  }
  res = min(res, s[t]);
  t = left;
  while (next(t) <= right) {
    res = min(res, r[t]);
    t = next(t);
  }
  return res;
}
void solve() {
  int n;
  scanf("%d", &n);
  ::n = 2 * n + 2;
  init();
  for (int i = 0; i < (n); i++) scanf("%d", &a[i]);
  for (int i = 0; i < (n); i++) scanf("%d", &b[i]);
  set<int> res;
  long long s = 0;
  for (int i = 0; i < (2 * n); i++) {
    s += a[i % n] - b[i % n];
    modify(i, s);
  }
  s = 0;
  for (int i = 0; i < n; i++) {
    long long x = query(i, i + n - 1);
    if (x - s >= 0) res.insert(i);
    s += a[i % n] - b[i % n];
  }
  reverse(a, a + n);
  reverse(b, b + n);
  rotate(b, b + 1, b + n);
  init();
  s = 0;
  for (int i = 0; i < (2 * n); i++) {
    s += a[i % n] - b[i % n];
    modify(i, s);
  }
  s = 0;
  for (int i = 0; i < n; i++) {
    long long x = query(i, i + n - 1);
    if (x - s >= 0) res.insert(n - 1 - i);
    s += a[i % n] - b[i % n];
  }
  printf("%d\n", res.size());
  for (set<int>::iterator it = res.begin(); it != res.end(); it++)
    printf("%d ", *it + 1);
}
int main() {
  solve();
  return 0;
}
