#include <bits/stdc++.h>
using namespace std;
long long arr[int(3e5 + 5)][2], n, k;
void solve() {
  int x[2] = {0, 0}, s = 0, l = 1, c = 0;
  for (long long *p = arr[0]; c < n; ++c, p += 2) {
    if (p[s] > p[l]) swap(s, l);
    long long d = p[l] - (p[s] * k - x[l]);
    if (d > k) {
      printf("NO");
      return;
    }
    if (d <= 0) {
      x[l] = x[s] = 0;
    } else {
      x[s] = 0, x[l] = d;
    }
  }
  printf("YES");
  return;
}
int main(void) {
  ios_base::sync_with_stdio(0);
  cin >> n >> k;
  int a[n], b[n];
  for (int i = 0; i < n; ++i) cin >> arr[i][0];
  for (int i = 0; i < n; ++i) cin >> arr[i][1];
  solve();
  return 0;
}
