#include <bits/stdc++.h>
using namespace std;
multiset<long long> g;
int const N = 100005;
long long a[N * 2], b[N * 2];
long long sa[N * 2], sb[N * 2];
bool vis[N];
void calc(int n, int flag) {
  int nn = n + n;
  for (int i = 1; i <= nn; i++) {
    sa[i] = a[i] + sa[i - 1];
    sb[i] = b[i] + sb[i - 1];
  }
  g.clear();
  g.insert(0);
  for (int i = 2; i <= n; i++) {
    g.insert(sa[i - 1] - sb[i - 1]);
  }
  if ((*(g.begin())) >= 0) {
    if (flag == 0)
      vis[1] = true;
    else
      vis[n] = true;
  }
  long long sum = 0;
  for (int i = 2; i <= n; i++) {
    g.erase(g.find(a[i - 1] - b[i - 1] - sum));
    sum -= (a[i - 1] - b[i - 1]);
    g.insert(-sum);
    if ((*(g.begin())) + sum >= 0) {
      if (flag == 0)
        vis[i] = true;
      else
        vis[n - i + 1] = true;
    }
  }
}
int main() {
  int n;
  while (~scanf("%d", &n)) {
    for (int i = 1; i <= n; i++) {
      vis[i] = false;
    }
    for (int i = 1; i <= n; i++) {
      scanf("%I64d", &a[i]);
      a[i + n] = a[i];
    }
    for (int i = 1; i <= n; i++) {
      scanf("%I64d", &b[i]);
      b[n + i] = b[i];
    }
    calc(n, 0);
    reverse(a + 1, a + n + 1);
    reverse(b + 1, b + n);
    for (int i = 1; i <= n; i++) a[n + i] = a[i];
    for (int i = 1; i <= n; i++) b[n + i] = b[i];
    calc(n, 1);
    int ans = 0;
    for (int i = 1; i <= n; i++)
      if (vis[i]) ans++;
    printf("%d\n", ans);
    for (int i = 1; i <= n; i++)
      if (vis[i]) printf("%d ", i);
  }
}
