#include <bits/stdc++.h>
using namespace std;
int n, k, x[300005], y[300005];
int main() {
  scanf("%d %d", &n, &k);
  long long prex = 0, prey = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &x[i]);
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", &y[i]);
  }
  for (int i = 0; i < n; i++) {
    if (prey == 0) {
      if (x[i] >= y[i]) {
        prex = max(0LL, x[i] + prex - 1LL * y[i] * k);
        prey = 0;
      } else {
        prey = max(0LL, y[i] - 1LL * x[i] * k);
        prex = 0;
      }
    } else if (prex == 0) {
      if (y[i] >= x[i]) {
        prey = max(0LL, y[i] + prey - 1LL * x[i] * k);
        prex = 0;
      } else {
        prex = max(0LL, x[i] - 1LL * y[i] * k);
        prey = 0;
      }
    }
    if (prex > k || prey > k) break;
  }
  if (prex > k || prey > k)
    printf("NO\n");
  else
    printf("YES\n");
  return 0;
}
