#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int M = 1e5 + 5, INF = 1e9;
int A[M], B[M];
int main() {
  int n;
  scanf("%d", &n);
  for (int j = 1; j <= n; j++) scanf("%d", &A[j]);
  for (int j = 1; j <= n; j++) scanf("%d", &B[j]);
  int rlast = 0, rmin = INF;
  A[n + 1] = A[1];
  for (int j = 1; j <= n; j++) {
    rlast += A[j] - B[j];
    rmin = min(rmin, rlast);
  }
  int llast = 0, lmin = INF;
  for (int j = n; j >= 2; j--) {
    llast += A[j + 1] - B[j];
    lmin = min(lmin, llast);
  }
  vector<int> ans;
  if (lmin >= 0 || rmin >= 0) ans.push_back(1);
  for (int j = 2; j <= n; j++) {
    rmin -= A[j - 1] - B[j - 1];
    if (rmin >= 0) ans.push_back(j);
  }
  for (int j = n; j >= 2; j--) {
    lmin -= A[j + 1] - B[j];
    if (lmin >= 0) ans.push_back(j);
  }
  sort(ans.begin(), ans.end());
  ans.erase(unique(ans.begin(), ans.end()), ans.end());
  printf("%d\n", ans.size());
  for (int x : ans) printf("%d ", x);
  return 0;
}
