#include <bits/stdc++.h>
long long a[100010], b[100010];
int use[100010];
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    for (int i = 0; i < n; i++) scanf("%I64d", &a[i]);
    for (int i = 0; i < n; i++) scanf("%I64d", &b[i]);
    long long minn = a[0] - b[0];
    long long sum = 0;
    for (int i = 0; i < n; i++) {
      sum += a[i] - b[i];
      if (sum < minn) minn = sum;
    }
    memset(use, 0, sizeof(use));
    for (int i = 0; i < n; i++) {
      minn += b[i] - a[i];
      if (minn >= 0) use[(i + 1) % n] = 1;
    }
    minn = a[0] - b[n - 1];
    sum = 0;
    for (int i = n - 1; i >= 0; i--) {
      sum += a[(i + 1) % n] - b[i];
      if (sum < minn) minn = sum;
    }
    for (int i = n - 1; i >= 0; i--) {
      minn += b[i] - a[(i + 1) % n];
      if (minn >= 0) use[i] = 1;
    }
    int cnt = 0;
    for (int i = 0; i < n; i++)
      if (use[i]) cnt++;
    printf("%d\n", cnt);
    for (int i = 0; i < n; i++)
      if (use[i]) printf("%d ", i + 1);
    printf("\n");
  }
  return 0;
}
