#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long inf = 1e15;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long n, r;
  cin >> n >> r;
  vector<pair<long long, long long>> v(n);
  for (int i = 0; i < n; ++i) {
    cin >> v[i].first;
  }
  for (int i = 0; i < n; ++i) {
    cin >> v[i].second;
  }
  for (int i = 0; i < n; ++i) {
    if (v[i].second < v[i].first) {
      cout << -1;
      return 0;
    }
  }
  unsigned long long ans = 0;
  vector<unsigned long long> ansv;
  ansv.reserve(100000);
  unsigned long long ost = 0;
  unsigned long long cur = 0;
  for (int i = 0; i < n; ++i) {
    if (ost) {
      if (ost >= v[i].first) {
        cur += v[i].first;
        ost -= v[i].first;
      } else {
        v[i].first -= ost;
        v[i].second -= ost;
        cur += ost;
        ost = 0;
        if (v[i].second >= v[i].first * 2) {
          cur += v[i].first * 2;
        } else {
          long long a = v[i].second - v[i].first;
          v[i].first -= a;
          v[i].second -= a * 2;
          cur += a * 2;
          if (ans <= 100000) {
            while (v[i].first > 0) {
              ansv.push_back(cur);
              cur += r;
              ++ans;
              v[i].first -= r;
            }
          } else {
            long long b = v[i].first / r;
            if (v[i].first % r) {
              ++b;
            }
            ans += b;
            v[i].first -= b * r;
            cur += r * b;
          }
          if (v[i].first < 0) {
            ost = -v[i].first;
            cur += v[i].first;
          }
        }
      }
    } else {
      if (v[i].second >= v[i].first * 2) {
        cur += v[i].first * 2;
      } else {
        long long a = v[i].second - v[i].first;
        v[i].first -= a;
        v[i].second -= a * 2;
        cur += a * 2;
        if (ans <= 100000) {
          while (v[i].first > 0) {
            ansv.push_back(cur);
            cur += r;
            ++ans;
            v[i].first -= r;
          }
        } else {
          long long b = v[i].first / r;
          if (v[i].first % r) {
            ++b;
          }
          ans += b;
          v[i].first -= b * r;
          cur += r * b;
        }
        if (v[i].first < 0) {
          ost = -v[i].first;
          cur += v[i].first;
        }
      }
    }
  }
  cout << ans << "\n";
  if (ans <= 100000) {
    for (auto &i : ansv) {
      cout << i << ' ';
    }
  }
  return 0;
}
