#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:64777216")
vector<int> getIndex(vector<int> a, vector<int> b) {
  int s = 0;
  int e = 1000000010;
  int n = b.size();
  vector<int> d(n, e);
  while (s <= e) {
    int mid = (s + e) / 2;
    int suma = mid + a[0];
    bool is = true;
    for (int i = 0; i < n; ++i) {
      suma -= b[i];
      if (suma < 0) {
        is = false;
        break;
      }
      suma += a[(i + 1) % n];
    }
    if (is) {
      e = mid - 1;
      d[0] = mid;
    } else
      s = mid + 1;
  }
  vector<int> index;
  if (d[0] == 0) index.push_back(0);
  for (int i = n - 1; i >= 0; --i) {
    if (a[i] >= b[i]) {
      d[i] = d[(i + 1) % n] - (a[i] - b[i]);
      if (a[i] - b[i] >= d[(i + 1) % n]) {
        index.push_back(i);
      }
    } else {
      d[i] = d[(i + 1) % n] + b[i] - a[i];
    }
  }
  return index;
}
void Solve() {
  int n;
  cin >> n;
  vector<int> a(n), b(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (int i = 0; i < n; ++i) cin >> b[i];
  vector<int> index = getIndex(a, b);
  reverse(a.begin(), a.end());
  reverse(b.begin(), b.end());
  rotate(b.begin(), b.begin() + 1, b.end());
  vector<int> rindex = getIndex(a, b);
  vector<bool> use(n, 0);
  for (int i = 0; i < index.size(); ++i) {
    use[index[i]] = 1;
  }
  for (int i = 0; i < rindex.size(); ++i) {
    use[n - 1 - rindex[i]] = 1;
  }
  int count = 0;
  for (int i = 0; i < n; ++i) count += use[i];
  cout << count << endl;
  for (int i = 0; i < n; ++i)
    if (use[i]) cout << i + 1 << " ";
}
int main() {
  Solve();
  return 0;
}
