#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
int a[MAXN], b[MAXN];
bool ans1[MAXN];
bool ans2[MAXN];
int sta[MAXN], top;
int vis[MAXN];
int n;
void solve(bool *aa) {
  for (int i = 0; i < n; i++) {
    if (!vis[i] && a[i] < b[i]) {
      aa[i] = false;
      vis[i] = 1;
      int need = b[i] - a[i];
      for (int j = (i - 1 + n) % n; j != i; j = (j - 1 + n) % n) {
        vis[j] = 1;
        if (need + b[j] <= a[j]) {
          break;
        }
        aa[j] = false;
        need = need + b[j] - a[j];
      }
    }
  }
}
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;
}
