#include <bits/stdc++.h>
using namespace std;
int a[200001], b[200001];
bool ok[100001];
int main(void) {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    a[n + i] = a[i];
  }
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &b[i]);
    b[n + i] = b[i];
  }
  long long s = 0;
  int p = 1;
  for (int i = 1; i <= n; ++i) {
    s += a[i] - b[i];
    if (s < 0) {
      p = i + 1;
      s = 0;
    }
  }
  s = 0;
  for (int i = 0; i < n; ++i) {
    if (s >= 0) ok[(p + i - 1) % n + 1] = true;
    s -= a[p + i] - b[p + i];
  }
  s = 0, p = 2 * n;
  for (int i = 2 * n; i > n; --i) {
    s += a[i] - b[i - 1];
    if (s < 0) {
      p = i - 1;
      s = 0;
    }
  }
  s = 0;
  for (int i = 0; i < n; ++i) {
    if (s >= 0) ok[(p - i - 1) % n + 1] = true;
    s -= a[p - i] - b[p - i - 1];
  }
  int ans = 0;
  for (int i = 1; i <= n; ++i)
    if (ok[i]) ++ans;
  printf("%d\n", ans);
  for (int i = 1; i <= n; ++i)
    if (ok[i]) printf("%d ", i);
  printf("\n");
  return 0;
}
