#include <bits/stdc++.h>
using namespace std;
const int N = (int)3e6;
int a[N], b[N];
int l[N], r[N];
int tl[N], tr[N];
int n, k;
void gen() {
  k = 1;
  while (k <= 2 * n) k *= 2;
  for (int i = 0; i < (int)2 * n; ++i) tl[i + k] = l[i];
  for (int i = 0; i < (int)2 * n; ++i) tr[i + k] = r[i];
  for (int i = k - 1; i > 0; i--) tl[i] = min(tl[i + i], tl[i + i + 1]);
  for (int i = k - 1; i > 0; i--) tr[i] = min(tr[i + i], tr[i + i + 1]);
}
int get_minl(int t, int L, int R, int l, int r) {
  if (R < l || L > r) return 1 << 30;
  if (l <= L && R <= r) return tl[t];
  return min(get_minl(2 * t, L, (L + R) / 2, l, r),
             get_minl(2 * t + 1, (L + R) / 2 + 1, R, l, r));
}
int get_minr(int t, int L, int R, int l, int r) {
  if (R < l || L > r) return 1 << 30;
  if (l <= L && R <= r) return tr[t];
  return min(get_minr(2 * t, L, (L + R) / 2, l, r),
             get_minr(2 * t + 1, (L + R) / 2 + 1, R, l, r));
}
int minl(int i, int j) { return get_minl(1, k, 2 * k - 1, k + i, k + j); }
int minr(int i, int j) { return get_minr(1, k, 2 * k - 1, k + i, k + j); }
int main() {
  scanf("%d", &n);
  for (int i = 0; i < (int)n; ++i) {
    scanf("%d", &a[i]);
    a[i + n] = a[i];
  }
  for (int i = 0; i < (int)n; ++i) {
    scanf("%d", &b[i]);
    b[i + n] = b[i];
  }
  l[0] = 0;
  for (int i = 0; i < (int)2 * n; ++i) l[i + 1] = l[i] + a[i % n] - b[i % n];
  r[0] = 0;
  for (int i = 0; i < (int)2 * n; ++i)
    r[i + 1] = r[i] - a[(i + 1) % n] + b[i % n];
  gen();
  vector<int> ans;
  for (int i = 0; i < (int)n; ++i) {
    bool ok = false;
    if (minl(i, i + n - 1) == l[i]) ok = true;
    if (minr(i, i + n - 1) == r[i]) ok = true;
    if (ok) ans.push_back(i);
  }
  printf("%d\n", (int)(ans).size());
  for (int i = 0; i < (int)(int)(ans).size(); ++i) printf("%d ", ans[i] + 1);
  return 0;
}
