#include <bits/stdc++.h>
namespace ztd {
using namespace std;
template <typename T>
inline T read(T& t) {
  t = 0;
  short f = 1;
  char ch = getchar();
  double d = 0.1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -f;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') t = t * 10 + ch - '0', ch = getchar();
  if (ch == '.') {
    ch = getchar();
    while (ch <= '9' && ch >= '0') t += d * (ch ^ 48), d *= 0.1, ch = getchar();
  }
  t *= f;
  return t;
}
}  // namespace ztd
using namespace ztd;
const int maxn = 3e5 + 7;
long long n, k, a[maxn], b[maxn];
long long fa[maxn], fb[maxn];
signed main() {
  read(n);
  read(k);
  for (long long i = 1; i <= n; ++i) read(a[i]);
  for (long long i = 1; i <= n; ++i) read(b[i]);
  for (long long i = 1; i <= n; ++i) {
    fa[i] = max(0ll, a[i] - (k * b[i] - fa[i - 1]));
    fb[i] = max(0ll, b[i] - (k * a[i] - fb[i - 1]));
    if ((fa[i] > k) || (fb[i] > k)) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
  return 0;
}
