#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int maxn = 300009;
const int maxm = 300009;
const long long inf = 1e18;
const double pi = acos(-1.0);
const double eps = 1e-6;
long long myrand(long long mod) {
  return ((long long)rand() << 32 ^ (long long)rand() << 16 ^ rand()) % mod;
}
template <class T>
inline bool scan_d(T &ret) {
  char c;
  int sgn;
  if (c = getchar(), c == EOF) return false;
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  sgn = (c == '-') ? -1 : 1;
  ret = (c == '-') ? 0 : (c - '0');
  while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c - '0');
  ret *= sgn;
  return true;
}
inline bool scan_ch(char &ch) {
  if (ch = getchar(), ch == EOF) return false;
  while (ch == ' ' || ch == '\n') ch = getchar();
  return true;
}
template <class T>
inline void out_number(T x) {
  if (x < 0) {
    putchar('-');
    out_number(-x);
    return;
  }
  if (x > 9) out_number(x / 10);
  putchar(x % 10 + '0');
}
int n;
long long F[maxn], T[maxn], nf, nt, tmp, m;
int main() {
  scanf("%d%I64d", &n, &m);
  for (register int i = 1; i <= n; ++i) scanf("%I64d", F + i);
  for (register int i = 1; i <= n; ++i) scanf("%I64d", T + i);
  nf = nt = 0;
  for (register int i = 1; i <= n; ++i) {
    nf = max(0ll, F[i] - T[i] * m + nf);
    nt = max(0ll, T[i] - F[i] * m + nt);
    if (nf > m || nt > m) return puts("NO"), 0;
  }
  puts("YES");
  return 0;
}
