#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
struct node {
  long long x, y;
};
long long l[N], t[N];
node a[N];
vector<long long> ve;
int main() {
  ios::sync_with_stdio(false);
  long long n, r;
  cin >> n >> r;
  for (int i = 1; i <= n; i++) {
    cin >> l[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
  }
  for (int i = 1; i <= n; i++) {
    a[i].x = (t[i] - l[i]) * 2ll;
    if (a[i].x < 0) {
      puts("-1");
      exit(0);
    }
    a[i].y = l[i] * 2ll - t[i];
    if (a[i].y < 0) {
      a[i].y = 0;
      a[i].x = l[i] * 2;
    }
  }
  long long res = 0;
  long long ans = 0;
  long long now = 0;
  for (int i = 1; i <= n; i++) {
    if (res >= l[i]) {
      res -= l[i];
      now += l[i];
      continue;
    }
    if (res >= a[i].y) {
      now += res;
      now += (l[i] - res) * 2;
      res = 0;
      continue;
    }
    a[i].y -= res;
    now += res;
    res = 0;
    now += a[i].x;
    ans += (a[i].y + r - 1) / r;
    if (ans <= 1e5)
      for (int j = 1; j <= (a[i].y + r - 1) / r; j++) {
        ve.push_back(now + (j - 1) * r);
      }
    if (a[i].y % r) {
      res = r - (a[i].y % r);
    }
    now += a[i].y;
  }
  cout << ans << endl;
  if (ans <= 1e5) {
    for (int i = 0; i < ve.size(); i++) {
      cout << ve[i] << " ";
    }
    cout << endl;
  }
}
