#include <bits/stdc++.h>
using namespace std;
const long long N = 3 * 1e5 + 100;
long long n, k, x[N], y[N], lastx, lasty;
signed main() {
  scanf("%lld%lld", &n, &k);
  for (long long i = 1; i <= n; i++) scanf("%lld", &x[i]);
  for (long long i = 1; i <= n; i++) scanf("%lld", &y[i]);
  lastx = lasty = 0;
  for (long long i = 1; i <= n; i++) {
    if (lastx > k || lasty > k) {
      printf("NO\n");
      return 0;
    }
    lastx = max(0ll, x[i] + lastx - k * y[i]);
    lasty = max(0ll, y[i] + lasty - k * x[i]);
  }
  if (lastx > k || lasty > k) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
}
