#include <bits/stdc++.h>
void solve(const std::vector<int32_t>& a, const std::vector<int32_t>& b,
           std::set<size_t>& result) {
  const size_t n = a.size();
  std::vector<int32_t> ps(n + 1);
  for (size_t i = 0; i < n; ++i) {
    ps[i + 1] = ps[i] + a[i] - b[i];
  }
  int32_t min = *std::min_element(ps.begin(), ps.end());
  for (size_t i = 0; i < n; ++i) {
    if (ps[i] == min) {
      result.insert(i);
    }
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  size_t n;
  std::cin >> n;
  std::vector<int32_t> a(n);
  std::vector<int32_t> b(n);
  for (size_t i = 0; i < n; ++i) {
    std::cin >> a[i];
  }
  for (size_t i = 0; i < n; ++i) {
    std::cin >> b[i];
  }
  std::set<size_t> result;
  solve(a, b, result);
  reverse(a.begin(), a.end());
  reverse(b.begin(), b.end());
  rotate(b.begin(), b.begin() + 1, b.end());
  std::set<size_t> result_inv;
  solve(a, b, result_inv);
  for (size_t x : result_inv) {
    result.insert(n - 1 - x);
  }
  std::cout << result.size() << '\n';
  for (size_t x : result) {
    std::cout << x + 1 << ' ';
  }
  std::cout << '\n';
}
