#include <bits/stdc++.h>
using namespace std;
void prepare() {}
const int maxn = 100005;
int n;
int a[maxn], b[maxn];
vector<int> res;
int q[maxn];
void go(int x) {
  int l = 0, r = 0;
  long long cur = a[0];
  while (true) {
    cur -= b[r];
    (++r) %= n;
    while (cur < 0) {
      ((--l) += n) %= n;
      cur -= b[l];
      cur += a[l];
      if (l == r) break;
    }
    if (l != r)
      cur += a[r];
    else
      break;
  }
  assert(cur == 0);
  int s = l;
  do {
    ((--l) += n) %= n;
    cur -= b[l];
    cur += a[l];
    if (cur >= 0) res.push_back(x ? q[l] : l);
  } while (l != s);
}
bool solve() {
  int i;
  scanf("%d", &n);
  for (i = (0); i < (n); i++) scanf("%d", &a[i]);
  for (i = (0); i < (n); i++) scanf("%d", &b[i]);
  for (i = (0); i < (n); i++) q[i] = n - i - 1;
  go(0);
  reverse(a, a + n);
  reverse(b, b + n - 1);
  go(1);
  sort(res.begin(), res.end());
  res.resize(unique(res.begin(), res.end()) - res.begin());
  printf("%d\n", (int)(res).size());
  for (i = (0); i < ((int)(res).size()); i++) printf("%d ", res[i] + 1);
  return false;
}
int main() {
  prepare();
  while (solve())
    ;
  return 0;
}
