#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
long long x[N], y[N], f[N], g[N];
int main() {
  long long n, k;
  scanf("%lld%lld", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%lld", &x[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &y[i]);
  for (int i = 1; i <= n; i++) {
    f[i] = x[i] - (k * y[i] - f[i - 1]);
    g[i] = y[i] - (k * x[i] - g[i - 1]);
    f[i] = max(0LL, f[i]);
    g[i] = max(0LL, g[i]);
    if (f[i] > k || g[i] > k) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
  return 0;
}
