#include <bits/stdc++.h>
using namespace std;
const int N = 300005;
long long fx[N], fy[N], x[N], y[N];
template <class T>
void cmax(T &x, T y) {
  x = x > y ? x : y;
}
template <class T>
void cmin(T &x, T y) {
  x = x < y ? x : y;
}
template <class T>
void rd(T &x) {
  char c = getchar();
  int f = 1;
  x = 0;
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  x *= f;
}
int main() {
  int i, n;
  long long k;
  rd(n);
  rd(k);
  for (i = 1; i <= n; ++i) rd(x[i]);
  for (i = 1; i <= n; ++i) rd(y[i]);
  for (i = 1; i <= n; ++i) {
    fx[i] = max(0ll, x[i] - (k * y[i] - fx[i - 1]));
    fy[i] = max(0ll, y[i] - (k * x[i] - fy[i - 1]));
    if (fx[i] > k || fy[i] > k) return puts("NO\n"), 0;
  }
  puts("YES");
  return 0;
}
