#include <bits/stdc++.h>
using namespace std;
long long timereq(long long t, long long l) {
  return ((2 * l - t) > 0) ? 2 * l - t : 0;
}
int main() {
  long long n, tr, lr, r, i, j, x = 0, carry = 0, y, temp;
  cin >> n >> r;
  long long l[n + 1], t[n + 1], k = 0, ktime[100005], rpt[100005] = {0},
                                tc[n + 1];
  for (i = 1; i <= n; i++) {
    cin >> l[i];
  }
  tc[0] = t[0] = 0;
  for (i = 1; i <= n; i++) {
    cin >> t[i];
  }
  for (i = 1; i <= n; i++) {
    if (l[i] > t[i]) {
      cout << "-1\n";
      return 0;
    }
    tc[i] = t[i] + tc[i - 1];
    if (carry >= l[i]) {
      carry -= l[i];
      tc[i] = tc[i - 1] + l[i];
    } else {
      tr = t[i] - carry;
      lr = l[i] - carry;
      carry = 0;
      if (temp = timereq(tr, lr)) {
        ktime[k++ % 100005] = tc[i] - temp;
        temp -= r;
        if (temp > 0) {
          rpt[(k - 1) % 100005] = temp / r;
          if (temp % r) {
            rpt[(k - 1) % 100005]++;
            temp = temp % r - r;
          } else {
            temp = 0;
          }
          x += rpt[(k - 1) % 100005];
        }
        carry = 0 - temp;
      } else {
        tc[i] = tc[i - 1] + l[i] - lr + 2 * lr;
      }
    }
  }
  cout << k + x << endl;
  if (k + x <= 100000) {
    for (i = 0; i < k; i++) {
      cout << ktime[i] << " ";
      for (j = 0; j < rpt[i]; j++) {
        cout << (j + 1) * r + ktime[i] << " ";
      }
    }
    cout << endl;
  }
  return 0;
}
