#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
template <typename T>
inline T SQR(T a) {
  return a * a;
}
template <typename T>
struct InfP {
  operator T() const {
    return std::numeric_limits<T>::has_infinity
               ? std::numeric_limits<T>::infinity()
               : std::numeric_limits<T>::max();
  }
};
struct Infinity : InfP<int>,
                  InfP<long long>,
                  InfP<double>,
                  InfP<long double>,
                  InfP<char>,
                  InfP<unsigned long long>,
                  InfP<unsigned int>,
                  InfP<float> {
} INF;
const double PI = 2 * asin(1.0);
void solve();
int main(int argc, char *argv[]) {
  ios::sync_with_stdio(false);
  solve();
  return 0;
}
const double eps = 1e-6;
const int maxn = 1e5 + 100;
int a[maxn], b[maxn], c[maxn];
int n;
struct Cmp {
  bool operator()(const pair<int, int> &l, const pair<int, int> &r) const {
    return l.first == r.first ? l.second < r.second : l.first > r.first;
  }
};
set<int> ans;
bool ch = false;
void p1() {
  set<pair<int, int> > Set;
  int diff = 0;
  for (int i = 0; i < (int)(n); ++i) {
    diff += a[i] - b[i];
    Set.insert(make_pair(diff, i));
  }
  long long koef = 0;
  for (int i = 0; i < (int)(n); ++i) {
    while (Set.begin()->second < i) {
      Set.erase(Set.begin());
    }
    if (Set.begin()->first + koef >= 0) {
      if (!ch) {
        ans.insert(i + 1);
      } else {
        ans.insert(n - i);
      }
    }
    koef -= a[i] - b[i];
    diff += a[(i + n) % n] - b[(i + n) % n];
    Set.insert(make_pair(-koef, i + n));
  }
}
void solve() {
  scanf("%d", &n);
  for (int i = 0; i < (int)(n); ++i) {
    scanf("%d", &a[i]);
  }
  for (int i = 0; i < (int)(n); ++i) {
    scanf("%d", &b[i]);
  }
  p1();
  for (int i = 0; i < (int)(n / 2); ++i) {
    swap(a[i], a[n - i - 1]);
    swap(b[i], b[n - i - 1]);
  }
  for (int i = 0; i < (int)(n); ++i) {
    c[(i - 1 + n) % n] = b[i];
  }
  memcpy(b, c, sizeof(b));
  ch = true;
  p1();
  cout << ans.size() << endl;
  for (set<int>::iterator it = ans.begin(); it != ans.end(); ++it) {
    cout << *it << ' ';
  }
}
