#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(339264);
const long long MOD = 998244353;
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  vector<long long> b(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
  }
  set<int> correct;
  multiset<long long> anss;
  long long surp = 0;
  for (int j = 0; j < n; j++) {
    surp += b[j] - a[j];
    anss.insert(surp);
  }
  int diff = 0;
  for (int j = 0; j < n; j++) {
    if (diff + *anss.rbegin() <= 0) {
      correct.insert(j);
    }
    anss.erase(anss.find(b[j] - a[j] - diff));
    diff += a[j] - b[j];
    anss.insert(surp - diff);
  }
  anss.clear();
  surp = 0;
  for (int j = n - 1; j >= 0; j--) {
    surp += b[j] - a[(j + 1) % n];
    anss.insert(surp);
  }
  diff = 0;
  for (int j = n - 1; j >= 0; j--) {
    if (diff + *anss.rbegin() <= 0) {
      correct.insert((j + 1) % n);
    }
    anss.erase(anss.find(b[j] - a[(j + 1) % n] - diff));
    diff += a[(j + 1) % n] - b[j];
    anss.insert(surp - diff);
  }
  cout << correct.size() << endl;
  for (int i : correct) {
    cout << i + 1 << " ";
  }
  cout << endl;
  return 0;
}
