#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 5;
long long x[maxn], y[maxn];
int main() {
  int n;
  long long k;
  scanf("%d%I64d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%I64d", &x[i]);
  for (int i = 1; i <= n; i++) scanf("%I64d", &y[i]);
  long long sumx = 0, sumy = 0;
  for (int i = 1; i <= n; i++) {
    sumx = max(sumx + x[i] - k * y[i], 0ll);
    sumy = max(sumy + y[i] - k * x[i], 0ll);
    if (sumx > k || sumy > k) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
