#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
int a[MAXN], b[MAXN];
int d[MAXN];
bool ans1[MAXN];
bool ans2[MAXN];
int sta[MAXN], top;
int vis[MAXN];
int n;
void solve(bool *aa) {
  int minv = 1 << 30;
  d[0] = a[0] - b[0];
  if (d[0] < minv) minv = d[0];
  for (int i = 1; i < n; i++) {
    d[i] = d[i - 1] + a[i] - b[i];
    if (d[i] < minv) minv = d[i];
  }
  if (minv < 0) {
    aa[0] = false;
  }
  for (int i = 1; i < n; i++) {
    minv = minv - (a[i - 1] - b[i - 1]);
    if (minv < 0) {
      aa[i] = false;
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 0; i < n; i++) scanf("%d", &b[i]);
  memset(ans1, true, sizeof(ans1));
  memset(ans2, true, sizeof(ans2));
  solve(ans1);
  for (int i = 0; i < n / 2; i++) {
    swap(a[i], a[n - i - 1]);
  }
  for (int i = 0; i < (n - 1) / 2; i++) {
    swap(b[i], b[n - 1 - i - 1]);
  }
  memset(vis, 0, sizeof(vis));
  solve(ans2);
  top = 0;
  for (int i = 0; i < n; i++) {
    if (ans1[i] || ans2[n - i - 1]) {
      sta[top++] = i + 1;
    }
  }
  printf("%d\n", top);
  for (int i = 0; i < top; i++) {
    printf("%d", sta[i]);
    if (i != top - 1) printf(" ");
  }
  printf("\n");
  return 0;
}
