#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e5 + 11;
const int INF = (int)1e9;
int n, a[N], b[N], w[N];
struct tree {
  vector<int> a, lazy;
  tree() {
    a.assign(N * 4, 0);
    lazy.assign(N * 4, 0);
  }
  void init(int id, int l, int r) {
    lazy[id] = 0;
    if (l == r) {
      a[id] = w[l];
      return;
    }
    int mid = (l + r) / 2;
    init(id * 2, l, mid);
    init(id * 2 + 1, mid + 1, r);
    a[id] = min(a[id * 2], a[id * 2 + 1]);
  }
  void down(int id) {
    for (int i = id * 2; i <= id * 2 + 1; ++i) {
      lazy[i] += lazy[id];
      a[i] += lazy[id];
    }
    lazy[id] = 0;
  }
  void upd(int id, int l, int r, int u, int v, int delta) {
    if (l > v || r < u) return;
    if (u <= l && r <= v) {
      a[id] += delta;
      lazy[id] += delta;
      return;
    }
    down(id);
    int mid = (l + r) / 2;
    upd(id * 2, l, mid, u, v, delta);
    upd(id * 2 + 1, mid + 1, r, u, v, delta);
    a[id] = min(a[id * 2], a[id * 2 + 1]);
  }
  int get(int id, int l, int r, int k) {
    if (l == r) return a[id];
    down(id);
    int mid = (l + r) / 2;
    if (k <= mid) return get(id * 2, l, mid, k);
    return get(id * 2 + 1, mid + 1, r, k);
  }
  int getMin(int id, int l, int r, int u, int v) {
    if (l > v || r < u) return INF;
    if (u <= l && r <= v) return a[id];
    down(id);
    int mid = (l + r) / 2;
    int res = getMin(id * 2, l, mid, u, v);
    return min(res, getMin(id * 2 + 1, mid + 1, r, u, v));
  }
} it;
bool check[N];
void solve() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    a[i + n] = a[i];
  }
  for (int i = 1; i <= n; ++i) {
    cin >> b[i];
    b[i + n] = b[i];
  }
  w[1] = 0;
  for (int i = 2; i <= n + 1; ++i) {
    w[i] = w[i - 1] + a[i - 1] - b[i - 1];
  }
  it.init(1, 1, 2 * n);
  if (it.a[1] >= 0) check[1] = 1;
  for (int i = 2; i <= n; ++i) {
    it.upd(1, 1, 2 * n, i, i + n - 1, b[i - 1] - a[i - 1]);
    int tmp = it.get(1, 1, 2 * n, i + n - 1);
    it.upd(1, 1, 2 * n, i + n, i + n, tmp + a[i + n - 1] - b[i + n - 1]);
    if (it.getMin(1, 1, 2 * n, i, i + n) >= 0) check[i] = 1;
  }
  memset(w, 0, sizeof(w));
  w[n * 2] = 0;
  for (int i = n * 2 - 1; i >= n; --i) {
    w[i] = w[i + 1] + a[i + 1] - b[i];
  }
  it.init(1, 1, 2 * n);
  if (it.a[1] >= 0) check[n * 2] = 1;
  for (int i = n * 2 - 1; i >= n + 1; --i) {
    it.upd(1, 1, 2 * n, i - n + 1, i, b[i] - a[i + 1]);
    int tmp = it.get(1, 1, 2 * n, i - n + 1);
    it.upd(1, 1, 2 * n, i - n, i - n, tmp + a[i - n + 1] - b[i - n]);
    if (it.getMin(1, 1, 2 * n, i - n, i) >= 0) check[i] = 1;
  }
  int cnt = 0;
  for (int i = 1; i <= n; ++i)
    if (check[i] || check[i + n]) ++cnt;
  cout << cnt << '\n';
  for (int i = 1; i <= n; ++i)
    if (check[i] || check[i + n]) cout << i << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
