#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
long long R;
int l[N], t[N];
int k, n, m;
long long c[N];
int top;
long long res, cur;
long long Ans;
bool Check(int x, int y) {
  int T = (l[x] - y) * 2 + y;
  return T <= t[x];
}
int main() {
  scanf("%d%I64d", &n, &R);
  for (int i = 1; i <= n; i++) scanf("%d", &l[i]);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &t[i]);
    if (t[i] < l[i]) {
      puts("-1");
      return 0;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (res >= l[i]) {
      cur += l[i];
      res -= l[i];
      continue;
    }
    l[i] -= res;
    t[i] -= res;
    cur += res;
    res = 0;
    if (l[i] * 2 <= t[i]) {
      cur += l[i] << 1;
      continue;
    }
    int L = 1, r = l[i];
    while (L <= r) {
      int Mid = L + r >> 1;
      if (Check(i, Mid))
        r = Mid - 1;
      else
        L = Mid + 1;
    }
    cur += (l[i] - L) * 2 + L;
    Ans += (L - 1) / R + 1;
    res = R * ((L - 1) / R + 1) - L;
    if (Ans <= 100000) {
      for (long long j = cur - L + 1; j <= cur; j += R) c[++top] = j;
    }
  }
  cout << Ans << endl;
  if (Ans <= 100000) {
    for (int i = 1; i <= top; i++) printf("%I64d ", c[i] - 1);
    putchar('\n');
  }
  return 0;
}
