#include <bits/stdc++.h>
using namespace std;
int n;
long long A[100000], B[100000], C[100000];
multiset<long long> S;
vector<int> R;
bool CAN[100000];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%d", &A[i]);
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", &B[i]);
  }
  long long sa = 0, sb = 0;
  for (int i = 0; i < n; i++) {
    sa += A[i];
    sb += B[i];
    S.insert(sa - sb);
  }
  long long s = 0, tsa = 0, tsb = 0;
  for (int i = 0; i < n; i++) {
    long long t;
    t = *S.begin();
    tsa += A[i];
    tsb += B[i];
    if (t + s >= 0) R.push_back(i + 1);
    S.erase(S.find(tsa - tsb));
    s += (-A[i] + B[i]);
    sa += A[i];
    sb += B[i];
    S.insert(sa - sb);
  }
  for (int i = 0; i < R.size(); i++) CAN[R[i] - 1] = true;
  reverse(A, A + n);
  reverse(B, B + n);
  long long v = B[0];
  for (int i = 1; i < n; i++) B[i - 1] = B[i];
  B[n - 1] = v;
  R.erase(R.begin(), R.end());
  multiset<long long> T;
  S = T;
  sa = 0;
  sb = 0;
  for (int i = 0; i < n; i++) {
    sa += A[i];
    sb += B[i];
    S.insert(sa - sb);
  }
  s = 0;
  tsa = 0;
  tsb = 0;
  for (int i = 0; i < n; i++) {
    long long t;
    t = *S.begin();
    tsa += A[i];
    tsb += B[i];
    if (t + s >= 0) R.push_back(i + 1);
    S.erase(S.find(tsa - tsb));
    s += (-A[i] + B[i]);
    sa += A[i];
    sb += B[i];
    S.insert(sa - sb);
  }
  for (int i = 0; i < R.size(); i++) CAN[n - R[i]] = true;
  vector<int> RR;
  for (int i = 0; i < n; i++)
    if (CAN[i]) RR.push_back(i + 1);
  cout << RR.size() << endl;
  for (int i = 0; i < RR.size(); i++) cout << RR[i] << ' ';
  cout << endl;
  cin >> n;
  return 0;
}
