#include <bits/stdc++.h>
const double PI = 3.1415926;
const int KL = 1e6;
using namespace std;
int n;
long long a[KL], b[KL], c[KL], d[KL];
long long mn[4 * KL];
bool vis[KL];
void build(int cur, int st, int en) {
  if (st == en)
    mn[cur] = c[st];
  else {
    int mid = (st + en) / 2;
    build(2 * cur, st, mid);
    build(2 * cur + 1, mid + 1, en);
    mn[cur] = min(mn[2 * cur], mn[2 * cur + 1]);
  }
}
long long query(int cur, int st, int en, int l, int r) {
  if (l > en || r < st) return 1e15;
  if (l <= st && en <= r) return mn[cur];
  int mid = (st + en) / 2;
  return min(query(2 * cur, st, mid, l, r),
             query(2 * cur + 1, mid + 1, en, l, r));
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int j = 1; j <= n; j++) scanf("%d", &b[j]);
  for (int i = 1; i <= n; i++) c[i] = a[i] - b[i];
  for (int i = 2; i <= n; i++) c[i] += c[i - 1];
  build(1, 1, n);
  for (int i = 1; i <= n; i++) {
    long long ans = query(1, 1, n, i, n);
    ans -= c[i - 1];
    if (ans < 0) continue;
    ans = query(1, 1, n, 1, i - 1);
    ans += (c[n] - c[i - 1]);
    if (ans >= 0) vis[i] = 1;
  }
  for (int i = 2; i <= n; i++) d[i] = b[i - 1];
  d[1] = b[n];
  reverse(d + 1, d + n + 1);
  reverse(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) c[i] = a[i] - d[i];
  for (int i = 2; i <= n; i++) c[i] += c[i - 1];
  build(1, 1, n);
  for (int i = 1; i <= n; i++) {
    if (vis[n - i + 1]) continue;
    long long ans = query(1, 1, n, i, n);
    ans -= c[i - 1];
    if (ans < 0) continue;
    ans = query(1, 1, n, 1, i - 1);
    ans += (c[n] - c[i - 1]);
    if (ans >= 0) {
      vis[n - i + 1] = 1;
    }
  }
  vector<int> vec;
  for (int i = 1; i <= n; i++)
    if (vis[i]) vec.push_back(i);
  cout << vec.size() << endl;
  for (int i = 0; i < vec.size(); i++) cout << vec[i] << " ";
  ;
  return 0;
}
