#include <bits/stdc++.h>
using namespace std;
const int MX = 300005;
int A[MX], B[MX];
int f[MX], g[MX];
int main() {
  int n, k;
  ignore = scanf("%d %d", &n, &k);
  for (int i = 1; i <= n; i++) {
    ignore = scanf("%d", A + i);
  }
  for (int i = 1; i <= n; i++) {
    ignore = scanf("%d", B + i);
  }
  for (int i = 1; i <= n; i++) {
    int mnA = (g[i - 1] != -1 ? 0 : f[i - 1]);
    int mnB = (f[i - 1] != -1 ? 0 : g[i - 1]);
    if (B[i] * 1LL * k - mnA < A[i]) {
      f[i] = A[i] - B[i] * 1LL * k + mnA;
    } else if (A[i] * 1LL * k - mnB >= B[i]) {
      f[i] = 1;
    } else {
      f[i] = -1;
    }
    if (A[i] * 1LL * k - mnB < B[i]) {
      g[i] = B[i] - A[i] * 1LL * k + mnB;
    } else if (B[i] * 1LL * k - mnA >= A[i]) {
      g[i] = 1;
    } else {
      g[i] = -1;
    }
    if (f[i] > k) f[i] = -1;
    if (g[i] > k) g[i] = -1;
    if (f[i] == -1 && g[i] == -1) {
      printf("NO");
      return 0;
    }
  }
  printf("YES");
}
