#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const int MOD = 1e9 + 7;
const int N = 2e5 + 10;
long long f[N];
int n, x, p[N], a[N], b[N], ans[N];
bool comp(int x, int y) {
  if (f[x] == f[y]) return x < y;
  return f[x] < f[y];
}
void solve() {
  for (auto i = n + 1; i <= 2 * n; i++) a[i] = a[i - n], b[i] = b[i - n];
  for (auto i = 1; i <= 2 * n; i++) f[i] = f[i - 1] + a[i] - b[i];
  for (auto i = 0; i < 2 * n; i++) p[i] = i;
  sort(p, p + 2 * n, comp);
  int L = -1;
  for (auto i = 0; i < 2 * n; i++) {
    int x = p[i];
    if (x > L && x < n) ans[x + 1] = 1;
    L = max(L, x);
  }
  b[0] = b[n];
  for (auto i = 1; i <= 2 * n; i++)
    f[i] = f[i - 1] + a[2 * n - i + 1] - b[2 * n - i];
  L = -1;
  sort(p, p + 2 * n, comp);
  for (auto i = 0; i < 2 * n; i++) {
    int x = p[i];
    if (x > L && x < n) ans[n - x] = 1;
    L = max(L, x);
  }
  printf("%d\n", count(ans + 1, ans + n + 1, 1));
  for (auto i = 1; i <= n; i++)
    if (ans[i]) printf("%d ", i);
}
int main() {
  scanf("%d", &n);
  for (auto i = 1; i <= n; i++) scanf("%d", a + i);
  for (auto i = 1; i <= n; i++) scanf("%d", b + i);
  solve();
}
