#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:136777216")
using namespace std;
int bits(int x) { return x == 0 ? 0 : 1 + bits(x & (x - 1)); }
const double PI = acos(-1.0);
const double eps = 1e-12;
const int INF = 1000000000;
string nextString() {
  char buf[300000];
  scanf("%s", buf);
  return buf;
}
vector<int> a, b;
int p, cur, n;
vector<int> res;
void go(int i, int l, int need) {
  int ind = (l == 1) ? p : ((p - 1) + n) % n;
  while (cur + a[p] >= b[ind]) {
    cur += (a[p] - b[ind]);
    p += l;
    p = (p + n) % n;
    ind = (l == 1) ? p : ((p - 1) + n) % n;
    if (p == need || res[p] == l) {
      p = need;
      return;
    }
  }
}
int main() {
  cin >> n;
  res.resize(n);
  for (int(i) = 0; (i) < (n); (i)++) res[i] = 0;
  a.resize(n), b.resize(n);
  for (int(i) = 0; (i) < (n); (i)++) scanf("%d", &a[i]);
  for (int(i) = 0; (i) < (n); (i)++) scanf("%d", &b[i]);
  p = 0, cur = 0;
  go(0, 1, 0);
  vector<int> ans;
  if (p == 0 && a[0] >= b[0]) {
    res[0] = 1;
  }
  for (int i = n - 1; i > 0; i--) {
    if (a[i] < b[i]) {
      p = i;
      cur = 0;
      continue;
    } else {
      cur += (a[i] - b[i]);
      go(p, 1, i);
    }
    if (p == i) res[i] = 1;
  }
  p = 0, cur = 0;
  go(0, -1, 0);
  if (p == 0 && a[0] >= b[n - 1]) {
    res[0] = -1;
  }
  for (int(i) = (1); (i) < (n); (i)++) {
    if (a[i] < b[i - 1]) {
      p = i;
      cur = 0;
      continue;
    } else {
      cur += (a[i] - b[i - 1]);
      go(p, -1, i);
    }
    if (p == i) res[i] = -1;
  }
  for (int(i) = 0; (i) < (n); (i)++)
    if (res[i]) ans.push_back(i);
  cout << (int)(ans).size() << "\n";
  for (int(i) = 0; (i) < ((int)(ans).size()); (i)++) printf("%i ", ans[i] + 1);
  return 0;
}
