#include <bits/stdc++.h>
using namespace std;
inline int nextint() {
  int res = 0;
  char c = 0;
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9') {
    res = res * 10 + c - '0';
    c = getchar();
  }
  return res;
}
int n;
long long a[200000], b[200000];
bool good[200000];
bool ans[200000];
long long diff[200000];
const int maxh = 17;
const int maxn = (1 << maxh);
long long tree[2 * maxn];
void build() {
  for (int i = maxn - 1; i; i--) tree[i] = min(tree[i + i], tree[i + i + 1]);
}
long long get(int i, int j) {
  long long result = (long long)1e18;
  for (i += maxn - 1, j += maxn; i + 1 != j; i >>= 1, j >>= 1) {
    if (!(i & 1)) result = min(result, tree[i + 1]);
    if (j & 1) result = min(result, tree[j - 1]);
  }
  return result;
}
long long get_min(int i, int j) {
  long long result = (long long)1e18;
  if (i <= j) result = get(i + 1, j + 2);
  return result;
}
void go() {
  memset(tree, 0, sizeof(tree));
  for (int i = 0; i < (int)(n); ++i)
    tree[maxn + i + 1] = tree[maxn + i] + diff[i];
  build();
  for (int i = 0; i < (int)(n); ++i) {
    long long presum = tree[maxn + i];
    long long postsum = tree[maxn + n] - presum;
    long long m_main = get_min(i, n - 1);
    long long m_oth = get_min(0, i - 1);
    bool ok = true;
    if (-presum + m_main < 0) ok = false;
    if (postsum + m_oth < 0) ok = false;
    good[i] = ok;
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < (int)(n); ++i) {
    int _a;
    scanf("%d", &_a);
    a[i] = _a;
  }
  for (int i = 0; i < (int)(n); ++i) {
    int _b;
    scanf("%d", &_b);
    b[i] = _b;
  }
  for (int i = 0; i < (int)(n); ++i) diff[i] = a[i] - b[i];
  go();
  for (int i = 0; i < (int)(n); ++i)
    if (good[i]) ans[i] = true;
  memset(good, 0, sizeof(good));
  reverse(a + 1, a + n);
  reverse(b, b + n);
  for (int i = 0; i < (int)(n); ++i) diff[i] = a[i] - b[i];
  go();
  for (int i = 0; i < (int)(n); ++i)
    if (good[i]) ans[(n - i) % n] = true;
  int ans_size = 0;
  for (int i = 0; i < (int)(n); ++i)
    if (ans[i]) ans_size++;
  cout << ans_size << endl;
  for (int i = 0; i < (int)(n); ++i)
    if (ans[i]) cout << (i + 1) << " ";
  cout << endl;
  return 0;
}
