#include <bits/stdc++.h>
using namespace std;
long long int tree[4000001], arr[1000001], a1[1000001], b1[1000001];
set<long long int> s;
void build(long long int node, long long int a, long long int b) {
  if (a == b) {
    tree[node] = arr[a];
    return;
  }
  long long int mid = (a + b) / 2;
  build(2 * node, a, mid);
  build(2 * node + 1, mid + 1, b);
  tree[node] = min(tree[2 * node], tree[2 * node + 1]);
}
long long int query(long long int node, long long int a, long long int b,
                    long long int l, long long int r) {
  if (a > b || a > r || b < l) return 100000000;
  if (a >= l && b <= r) return tree[node];
  long long int mid = (a + b) / 2;
  return min(query(2 * node, a, mid, l, r),
             query(2 * node + 1, mid + 1, b, l, r));
}
int main() {
  ios::sync_with_stdio(false);
  ;
  cin.tie(0);
  ;
  long long int i, j, n;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a1[i];
  for (i = 1; i <= n; i++) cin >> b1[i];
  for (i = 1; i <= n; i++) arr[i] = a1[i] - b1[i];
  for (i = n + 1; i <= 2 * n; i++) arr[i] = arr[i - n];
  for (i = 1; i <= 2 * n; i++) arr[i] += arr[i - 1];
  build(1, 1, 2 * n);
  for (i = 1; i <= n; i++) {
    if (query(1, 1, 2 * n, i, i + n) >= arr[i - 1]) s.insert(i);
  }
  b1[0] = b1[n];
  for (i = 1; i <= n; i++) arr[i] = a1[i] - b1[i - 1];
  for (i = n + 1; i <= 2 * n; i++) arr[i] = arr[i - n];
  for (i = 2 * n; i >= 1; i--) arr[i] += arr[i + 1];
  build(1, 1, 2 * n);
  for (i = n + 1; i <= 2 * n; i++) {
    if (query(1, 1, 2 * n, i - n, i) >= arr[i + 1]) s.insert(i - n);
  }
  cout << s.size() << endl;
  while (s.size()) {
    cout << *s.begin() << " ";
    s.erase(s.begin());
  }
  return 0;
}
