#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
vector<int> T, L;
int size, lisc, P;
void Stworz(int n, vector<int>& x) {
  T.clear();
  L.clear();
  P = 1;
  while (P < n) P *= 2;
  lisc = P;
  size = 2 * P - 1;
  while (x.size() < P) x.push_back(INF);
  for (int i = 0; i <= size; ++i) {
    T.push_back(INF);
    L.push_back(0);
  }
  for (int i = size; i >= 1; --i) {
    if (2 * i > size)
      T[i] = x[i - lisc];
    else
      T[i] = min(T[2 * i], T[2 * i + 1]);
  }
}
void Dodaj(int node, int a, int b, int i, int j, int v) {
  if (L[node] != 0) {
    T[node] += L[node];
    if (a != b) {
      L[2 * node] += L[node];
      L[2 * node + 1] += L[node];
    }
    L[node] = 0;
  }
  if (a > b || a > j || b < i) return;
  if (a >= i && b <= j) {
    T[node] += v;
    if (a != b) {
      L[2 * node] += v;
      L[2 * node + 1] += v;
    }
    return;
  }
  Dodaj(2 * node, a, (a + b) / 2, i, j, v);
  Dodaj(2 * node + 1, (a + b) / 2 + 1, b, i, j, v);
  T[node] = min(T[2 * node], T[2 * node + 1]);
}
int Mini(int node, int a, int b, int i, int j) {
  if (a > b || a > j || b < i) return INF;
  if (L[node] != 0) {
    T[node] += L[node];
    if (a != b) {
      L[2 * node] += L[node];
      L[2 * node + 1] += L[node];
    }
    L[node] = 0;
  }
  if (a >= i && b <= j) return T[node];
  return min(Mini(2 * node, a, (a + b) / 2, i, j),
             Mini(2 * node + 1, (a + b) / 2 + 1, b, i, j));
}
int main() {
  ios_base::sync_with_stdio(0);
  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> r(n), pref(n);
  for (int i = 0; i < n; ++i) {
    r[i] = a[i] - b[i];
    pref[i] = r[i];
    if (i != 0) pref[i] += pref[i - 1];
  }
  vector<bool> odp(n, false);
  Stworz(2 * n - 1, pref);
  int l = 0, p = n - 1;
  if (Mini(1, 0, P - 1, l, p) >= 0) odp[0] = true;
  for (int i = 0; i <= n - 2; ++i) {
    Dodaj(1, 0, P - 1, l, p, -r[i]);
    int dod = pref[n - 1] - INF;
    Dodaj(1, 0, P - 1, p + 1, p + 1, dod);
    ++l;
    ++p;
    if (Mini(1, 0, P - 1, l, p) >= 0) odp[i + 1] = true;
  }
  int ost = b[n - 1];
  for (int i = n - 1; i >= 1; --i) b[i] = b[i - 1];
  b[0] = ost;
  reverse(b.begin(), b.end());
  reverse(a.begin(), a.end());
  pref.clear();
  for (int i = 0; i < n; ++i) {
    r[i] = a[i] - b[i];
    pref.push_back(r[i]);
    if (i != 0) pref[i] += pref[i - 1];
  }
  Stworz(2 * n - 1, pref);
  l = 0, p = n - 1;
  if (Mini(1, 0, P - 1, l, p) >= 0) odp[n - 1] = true;
  for (int i = 0; i <= n - 2; ++i) {
    Dodaj(1, 0, P - 1, l, p, -r[i]);
    int dod = pref[n - 1] - INF;
    Dodaj(1, 0, P - 1, p + 1, p + 1, dod);
    ++l;
    ++p;
    if (Mini(1, 0, P - 1, l, p) >= 0) odp[n - i - 2] = true;
  }
  int il = 0;
  for (int i = 0; i < n; ++i)
    if (odp[i]) ++il;
  cout << il << endl;
  for (int i = 0; i < n; ++i)
    if (odp[i]) cout << i + 1 << " ";
  return 0;
}
