#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, w = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') w = -1;
    c = getchar();
  }
  while (c <= '9' && c >= '0') {
    x = (x << 1) + (x << 3) + c - '0';
    c = getchar();
  }
  return w == 1 ? x : -x;
}
long long x[300005], y[300005], fx[300005], fy[300005];
int main() {
  long long n = read(), k = read();
  for (int i = 1; i <= n; i++) x[i] = read();
  for (int i = 1; i <= n; i++) y[i] = read();
  for (int 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) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
  return 0;
}
