#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  char c = getchar();
  long long x = 0;
  while (c > '9' || c < '0') c = getchar();
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x;
}
long long a[2000005], b[2000005], f[2000005], g[2000005], n, k;
signed main() {
  n = read();
  k = read();
  for (long long i = 1; i <= n; i++) a[i] = read();
  for (long long i = 1; i <= n; i++) b[i] = read();
  for (long long i = 1; i <= n; i++) {
    f[i] = max(0ll, a[i] - (k * b[i] - f[i - 1]));
    g[i] = max(0ll, b[i] - (k * a[i] - g[i - 1]));
    if (f[i] > k || g[i] > k) puts("NO"), exit(0);
  }
  puts("YES");
}
