#include <bits/stdc++.h>
using namespace std;
int n;
int a[222222], b[222222];
bool r[222222];
int main() {
  cin >> n;
  for (int i(0); i < n; ++i) scanf("%d", a + i);
  for (int i(0); i < n; ++i) scanf("%d", b + i);
  int q = -1u / 2, d = 0;
  for (int i(0); i < n; ++i) {
    d += a[i] - b[i];
    q = min(q, d);
  }
  for (int i(0); i < n; ++i) {
    d += a[i] - b[i];
    if (q == d) r[(i + 1) % n] = true;
  }
  q = -1u / 2;
  for (int i = n; i-- > 0;) {
    d += a[(i + 1) % n] - b[i];
    q = min(q, d);
  }
  for (int i = n; i-- > 0;) {
    d += a[(i + 1) % n] - b[i];
    if (q == d) r[i] = true;
  }
  vector<int> res;
  for (int i(0); i < n; ++i)
    if (r[i]) res.push_back(i);
  cout << int((res).size()) << endl;
  for (int i(0); i < int((res).size()); ++i) {
    if (i) putchar(' ');
    printf("%d", res[i] + 1);
  }
  cout << endl;
  return 0;
}
