#include <bits/stdc++.h>
using namespace std;
constexpr int MAX_N = 300009;
int n, k, x[MAX_N], y[MAX_N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    cin >> x[i];
  }
  for (int i = 0; i < n; ++i) {
    cin >> y[i];
  }
  int minx = 0, miny = 0;
  for (int i = 0; i < n; ++i) {
    int tminx = max(minx + x[i] - y[i] * (int64_t)k, (int64_t)0);
    int tminy = max(miny + y[i] - x[i] * (int64_t)k, (int64_t)0);
    minx = tminx;
    miny = tminy;
    if (minx > k || miny > k) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
}
