#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long power(long long a, long long n) {
  a %= 1000000007;
  if (n == 1) return a;
  if (n == 0) return 1;
  if (n % 2)
    return (a * (power((a * a) % 1000000007, n / 2) % 1000000007)) % 1000000007;
  return power((a * a) % 1000000007, n / 2) % 1000000007;
}
const long long inf = (long long)1e18;
long long inverse(long long x) { return power(x, 1000000007 - 2) % 1000000007; }
void solve() {
  long long n;
  cin >> n;
  vector<long long> a(n + 5), b(n + 5), p(n + 5), mis(n + 5), mip(n + 5),
      s(n + 5);
  for (long long i = 1; i < n + 1; ++i) cin >> a[i];
  for (long long i = 1; i < n + 1; ++i) cin >> b[i];
  for (long long i = 1; i < n + 1; ++i) p[i] = p[i - 1] + a[i] - b[i];
  for (long long i = n; i > 0; --i) s[i] = s[i + 1] + a[i] - b[i];
  mip[1] = p[1];
  for (long long i = 2; i < n + 1; ++i) {
    mip[i] = min(mip[i - 1], p[i]);
  }
  mis[n] = p[n];
  for (long long i = n; i > 0; --i) {
    mis[i] = min(mis[i + 1], p[i]);
  }
  set<long long> ans;
  for (long long i = 1; i < n + 1; ++i)
    if (p[i - 1] <= mis[i] && p[i - 1] <= mip[i - 1] + p[n]) ans.insert(i);
  for (long long i = n; i > 1; --i) s[i] = s[i + 1] + a[i] - b[i - 1];
  s[1] = s[2] + a[1] - b[n];
  mip[1] = s[1];
  for (long long i = 2; i < n + 1; ++i) mip[i] = min(mip[i - 1], s[i]);
  mis[n] = s[n];
  for (long long i = n - 1; i > 0; --i) mis[i] = min(mis[i + 1], s[i]);
  for (long long i = 1; i < n + 1; ++i)
    if (mip[i] >= s[i + 1] && mis[i + 1] + s[1] >= s[i + 1]) ans.insert(i);
  cout << (long long)ans.size() << "\n";
  for (auto &x : ans) cout << x << " ";
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long T = 1;
  for (long long t = 1; t < T + 1; ++t) {
    solve();
  }
  return 0;
}
