#include <bits/stdc++.h>
using namespace std;
int n, k;
int x[300000];
int y[300000];
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) scanf("%d", &x[i]);
  for (int i = 0; i < n; i++) scanf("%d", &y[i]);
  int mx = 0, my = 0, nmx = 0, nmy = 0;
  for (int i = 0; i < n; i++) {
    if (x[i] > y[i]) {
      if (my <= k) {
        nmx = 1;
        nmx += max(0LL, (x[i] - 1) - y[i] * 1LL * k);
        if (x[i] <= y[i] * k)
          nmy = 1;
        else
          nmy = k + 1;
      } else {
        x[i] -= min(k - mx, x[i] - y[i]);
        if (x[i] == y[i])
          nmx = 1;
        else {
          nmx = 1;
          nmx += max(0LL, x[i] - 1 - (y[i] - 1LL) * k);
        }
        if (x[i] <= (y[i] - 1LL) * k)
          nmy = 1;
        else
          nmy = k + 1;
      }
    } else if (x[i] == y[i]) {
      if (mx < k) {
        nmx = 1;
        nmy = 1;
      } else if (mx == k) {
        nmx = 1;
        if (k == 1 || x[i] == 1)
          nmy = k + 1;
        else
          nmy = 1;
      } else {
        nmy = 1;
        if (k == 1 || y[i] == 1)
          nmx = k + 1;
        else
          nmx = 1;
      }
    } else {
      if (mx <= k) {
        nmy = 1;
        nmy += max(0LL, (y[i] - 1) - x[i] * 1LL * k);
        if (y[i] <= x[i] * k)
          nmx = 1;
        else
          nmx = k + 1;
      } else {
        y[i] -= min(k - my, y[i] - x[i]);
        if (y[i] == x[i])
          nmy = 1;
        else {
          nmy = 1;
          nmy += max(0LL, y[i] - 1 - (x[i] - 1LL) * k);
        }
        if (y[i] <= (x[i] - 1LL) * k)
          nmx = 1;
        else
          nmx = k + 1;
      }
    }
    mx = nmx;
    my = nmy;
    if (mx > k && my > k) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
