#include <bits/stdc++.h>
using namespace std;
long long n, a[100005], b[100005], d[100005];
vector<long long> ans;
bool used[100005];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (long long i = 1; i <= n; ++i) cin >> a[i];
  for (long long i = 1; i <= n; ++i) cin >> b[i];
  long long minn = 1e18;
  for (long long i = 1; i <= n; ++i) {
    d[i] = d[i - 1] + a[i] - b[i];
    minn = min(minn, d[i]);
  }
  if (minn >= 0) {
    ans.push_back(1);
    used[1] = 1;
  }
  for (long long i = 1; i < n; ++i) {
    minn -= a[i] - b[i];
    if (minn >= 0) {
      ans.push_back(i + 1);
      used[i + 1] = 1;
    }
  }
  for (long long i = 0; i < 100005; ++i) d[i] = 0;
  minn = 1e18;
  b[0] = b[n];
  for (long long i = n; i > 0; --i) {
    d[i] = d[i + 1] + a[i] - b[i - 1];
    minn = min(minn, d[i]);
  }
  if (minn >= 0 && used[n] == 0) ans.push_back(n);
  for (long long i = n; i > 1; --i) {
    minn -= (a[i] - b[i - 1]);
    if (minn >= 0 && used[i - 1] == 0) ans.push_back(i - 1);
  }
  sort(ans.begin(), ans.end());
  cout << ans.size() << "\n";
  for (long long i = 0; i < ans.size(); ++i) cout << ans[i] << " ";
  return 0;
}
