#include <bits/stdc++.h>
using namespace std;
const long long maxn = 100000 + 10;
long long n, a[maxn], b[maxn], c[maxn], d[maxn], ans = 0, MIN;
bool mark[maxn];
void solve(bool sw) {
  d[1] = c[0];
  MIN = d[1];
  for (long long i = 2; i <= n; i++) {
    d[i % n] = d[i - 1] + c[i - 1];
    MIN = min(MIN, d[i % n]);
  }
  if (MIN >= 0)
    if (sw)
      mark[0] = true;
    else
      mark[n - 1] = true;
  for (long long i = 1; i < n; i++) {
    MIN -= c[i - 1];
    if (MIN >= 0)
      if (sw)
        mark[i] = true;
      else
        mark[n - 1 - i] = true;
  }
}
int main() {
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < n; i++) cin >> b[i];
  for (long long i = 0; i < n; i++) c[i] = a[i] - b[i];
  solve(true);
  reverse(b, b + n);
  reverse(a, a + n);
  b[n] = b[0];
  for (long long i = 0; i < n; i++) b[i] = b[i + 1];
  for (long long i = 0; i < n; i++) c[i] = a[i] - b[i];
  solve(false);
  for (long long i = 0; i < n; i++) ans += mark[i];
  cout << ans << endl;
  for (long long i = 0; i < n; i++)
    if (mark[i]) cout << i + 1 << ' ';
  cout << endl;
  return 0;
}
