#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
long long n, dpx[N], dpy[N], x[N], y[N], k;
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i) cin >> x[i];
  for (int i = 1; i <= n; ++i) cin >> y[i];
  for (int i = 1; i <= n; ++i) {
    dpx[i] = max(0ll, x[i] - (k * y[i] - dpx[i - 1]));
    dpy[i] = max(0ll, y[i] - (k * x[i] - dpy[i - 1]));
    if (dpx[i] > k || dpy[i] > k) {
      puts("NO");
      exit(0);
    }
  }
  puts("YES");
  return 0;
}
