#include <bits/stdc++.h>
using namespace std;
long long n, r;
std::vector<long long> ls;
std::vector<long long> ts;
std::vector<long long> res;
int main() {
  cin >> n >> r;
  ls.resize(n);
  ts.resize(n);
  for (long long i = 0; i < n; i++) {
    cin >> ls[i];
  }
  for (long long i = 0; i < n; i++) {
    cin >> ts[i];
  }
  long long m = 0, x, ans = 0, prevTime = 0;
  for (long long i = 0; i < n; i++) {
    x = ts[i] - ls[i];
    if (x < 0) {
      cout << "-1\n";
      return 0;
    }
    if (m >= ls[i]) {
      m -= ls[i];
      prevTime += ls[i];
      continue;
    }
    ls[i] -= m;
    ts[i] -= m;
    prevTime += m;
    if (x >= ls[i]) {
      m = 0;
      prevTime += 2 * ls[i];
    } else {
      int temp = (ls[i] - x) % r;
      int b = (ls[i] - x) / r + (temp == 0 ? 0 : 1);
      ans += b;
      m = temp == 0 ? 0 : r - temp;
      if (ans <= 100000) {
        for (int j = 0; j < b; j++) {
          res.push_back(prevTime + 2 * x + j * r);
        }
      }
      prevTime += 2 * x + (ls[i] - x);
    }
  }
  cout << ans << endl;
  if (ans <= 100000) {
    for (int k = 0; k < res.size(); k++) {
      cout << res[k] << " ";
    }
  }
  return 0;
}
