#include <bits/stdc++.h>
using namespace std;
const int N = 1000005;
int n, k, a[N], b[N];
long long f[N], g[N];
int main() {
  scanf("%d%d", &n, &k);
  register int i;
  for (i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (i = 1; i <= n; ++i) scanf("%d", &b[i]);
  for (register int i = 1, x, y; i <= n; ++i) {
    x = a[i], y = b[i], f[i] = x - ((0ll + y) * k - f[i - 1]),
    g[i] = y - ((0ll + x) * k - g[i - 1]), f[i] < 0 ? f[i] = 0 : 0,
    g[i] < 0 ? g[i] = 0 : 0;
    if (f[i] > k || g[i] > k) return puts("NO"), 0;
  }
  puts("YES");
  return 0;
}
