#include <bits/stdc++.h>
using namespace std;
int n, a[200000], b[200000], sum[200000], deq[200000];
int sz, ans[200000];
bool ok[200000];
void run() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", a + i), a[i + n] = a[i];
  for (int i = 0; i < n; i++) scanf("%d", b + i), b[i + n] = b[i];
  for (int it = 0; it < 2; it++) {
    for (int i = 0; i < 2 * n; i++) sum[i] = a[i] - b[i];
    for (int i = 0; i < 2 * n - 1; i++) sum[i + 1] += sum[i];
    int s = 0, t = 0, minus = 0;
    for (int i = 0; i < 2 * n - 1; i++) {
      while (s < t && sum[deq[t - 1]] >= sum[i]) t--;
      deq[t++] = i;
      if (i - n + 1 >= 0) {
        if (sum[deq[s]] - minus >= 0)
          ok[it ? n - 1 - (i - n + 1) : i - n + 1] = 1;
        minus += a[i - n + 1] - b[i - n + 1];
        if (deq[s] == i - n + 1) s++;
      }
    }
    if (!it)
      reverse(a, a + 2 * n), reverse(b, b + 2 * n), rotate(b, b + 1, b + 2 * n);
  }
  for (int i = 0; i < n; i++)
    if (ok[i]) ans[sz++] = i + 1;
  printf("%d\n", sz);
  for (int i = 0; i < sz; i++) printf("%d%c", ans[i], i == sz - 1 ? '\n' : ' ');
}
int main() {
  run();
  return 0;
}
