#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e5 + 5, LIM = (int)1e5;
int n;
int NO() {
  puts("-1");
  return 0;
}
template <typename Tp>
inline void rd(Tp &res) {
  char c;
  res = 0;
  while (c = getchar(), !isdigit(c))
    ;
  do res = (res << 1) + (res << 3) + (c ^ 48);
  while (c = getchar(), isdigit(c));
}
template <typename Tp>
void print_positive(Tp x) {
  if (x == 0) return;
  print_positive(x / 10);
  putchar(x % 10 ^ 48);
}
template <typename Tp>
inline void print(Tp x) {
  if (x == 0)
    putchar('0');
  else if (x < 0)
    putchar('-'), print_positive(-x);
  else
    print_positive(x);
}
long long ans[N];
long long r, l[N], t[N];
long long tot;
int main() {
  cin >> n >> r;
  for (int i = 1; i <= n; i++) {
    int x;
    rd(x);
    l[i] = x;
  }
  for (int i = 1; i <= n; i++) {
    int x;
    rd(x);
    t[i] = x;
  }
  long long is_ok = 0, cur_time = 0;
  for (int i = 1; i <= n; i++) {
    if (t[i] < l[i]) return NO();
    long long cur_len = l[i] + (-is_ok);
    if (cur_len <= 0) {
      is_ok = -cur_len;
      continue;
    }
    t[i] -= is_ok;
    is_ok = 0;
    if (t[i] >= cur_len * 2) {
      cur_time += cur_len * 2;
      continue;
    }
    long long res = 2 * (t[i] + (-cur_len));
    cur_time += res;
    long long cnt = cur_len - res / 2;
    while (tot < LIM && cnt > 0)
      ans[++tot] = (long long)cur_time, cnt -= r, cur_time += r;
    if (cnt > 0) {
      long long tmp = (cnt - 0.1 + r) / r;
      tot += tmp;
      cur_time += tmp * r;
      cnt -= tmp * r;
    }
    is_ok = -cnt;
  }
  if (tot <= LIM) {
    cout << tot << endl;
    for (int i = 1; i < tot; i++) {
      print(ans[i]);
      putchar(' ');
    }
    if (tot) print(ans[tot]);
  } else
    cout << tot << endl;
  return 0;
}
