#include <bits/stdc++.h>
using namespace std;
long long min_value[200010 * 4];
long long sum[200010 * 4];
bool ok[200010];
int a[200010];
int b[200010];
int c[200010];
long long d[200010];
void pushup(int rt) {
  sum[rt] = sum[rt << 1] + sum[rt << 1 | 1];
  min_value[rt] =
      min(min_value[rt << 1], sum[rt << 1] + min_value[rt << 1 | 1]);
}
void build(int l, int r, int rt) {
  if (l == r) {
    sum[rt] = c[l];
    min_value[rt] = c[l];
    return;
  }
  int m = (l + r) / 2;
  build(l, m, rt << 1);
  build(m + 1, r, rt << 1 | 1);
  pushup(rt);
}
long long query_sum(int L, int R, int l, int r, int rt) {
  if (L <= l && r <= R) return sum[rt];
  int m = (l + r) / 2;
  long long ret = 0;
  if (L <= m) ret += query_sum(L, R, l, m, rt << 1);
  if (R > m) ret += query_sum(L, R, m + 1, r, rt << 1 | 1);
  return ret;
}
int n;
long long query_min(int L, int R, int l, int r, int rt) {
  if (L <= l && r <= R) return min_value[rt];
  int m = (l + r) / 2;
  long long ret = (1LL) << 62;
  long long add = 0;
  if (L <= m) {
    ret = min(ret, query_min(L, R, l, m, rt << 1));
    add = query_sum(L, m, l, m, rt << 1);
  }
  if (R > m) {
    ret = min(ret, add + query_min(L, R, m + 1, r, rt << 1 | 1));
  }
  return ret;
}
vector<int> ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
  memset(ok, false, sizeof(ok));
  for (int i = 1; i <= n; i++) c[i] = a[i] - b[i];
  for (int i = n + 1; i <= n + n; i++) c[i] = c[i - n];
  build(1, n + n, 1);
  for (int i = 1; i <= n; i++)
    if (query_min(i, i + n, 1, n + n, 1) >= 0) ok[i] = true;
  c[n] = a[1] - b[n];
  for (int i = n; i >= 2; i--) c[n - i + 1] = a[i] - b[i - 1];
  for (int i = n + 1; i <= n + n; i++) c[i] = c[i - n];
  build(1, n + n, 1);
  for (int i = 1; i <= n; i++)
    if (query_min(i, i + n, 1, n + n, 1) >= 0) ok[n - i + 1] = true;
  ans.clear();
  for (int i = 1; i <= n; i++)
    if (ok[i]) ans.push_back(i);
  int len = ans.size();
  printf("%d\n", len);
  for (int i = 0; i < len; i++) {
    printf("%d", ans[i]);
    if (i == len - 1)
      printf("\n");
    else
      printf(" ");
  }
  return 0;
}
