#include <bits/stdc++.h>
using namespace std;
inline bool rd(int &n) {
  int x = 0, tmp = 1;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-' && c != EOF) c = getchar();
  if (c == EOF) return false;
  if (c == '-') c = getchar(), tmp = -1;
  while (c >= '0' && c <= '9') x *= 10, x += (c - '0'), c = getchar();
  n = x * tmp;
  return true;
}
inline void pt(int n) {
  if (n < 0) putchar('-'), n = -n;
  int len = 0, data[20];
  while (n) data[len++] = n % 10, n /= 10;
  if (!len) data[len++] = 0;
  while (len--) putchar(data[len] + 48);
}
inline bool rdl(long long &n) {
  long long x = 0, tmp = 1;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-' && c != EOF) c = getchar();
  if (c == EOF) return false;
  if (c == '-') c = getchar(), tmp = -1;
  while (c >= '0' && c <= '9') x *= 10, x += (c - '0'), c = getchar();
  n = x * tmp;
  return true;
}
int n, l, r;
long long a[100005], b[100005];
bool vis[100005];
int pos[100005];
void go() {
  long long Min = (long long)1e18, now = 0;
  for (int i = 1; i <= n; i++) now += a[i] - b[i], Min = min(Min, now);
  for (int i = 1; i <= n; i++) vis[pos[i]] |= (Min >= 0), Min += b[i] - a[i];
}
void build() {
  for (int i = 1; i + i <= n; i++)
    swap(pos[i], pos[n - i + 1]), swap(a[i], a[n - i + 1]);
  for (int i = 1; i + i <= n - 1; i++) swap(b[i], b[n - i]);
}
vector<int> ans;
int main() {
  int i, j, u, v;
  while (rd(n)) {
    for (i = 1; i <= n; i++) rdl(a[i]);
    for (i = 1; i <= n; i++) rdl(b[i]), pos[i] = i;
    go();
    build();
    go();
    ans.clear();
    for (i = 1; i <= n; i++)
      if (vis[i]) ans.push_back(i);
    pt(ans.size());
    putchar('\n');
    for (i = 0; i < ans.size(); i++) pt(ans[i]), putchar(' ');
    putchar('\n');
  }
  return 0;
}
