#include <bits/stdc++.h>
int main() {
  static int xx[1 + 300000], yy[1 + 300000], dx[1 + 300000], dy[1 + 300000];
  int n, i;
  long long k;
  scanf("%d%lld", &n, &k);
  for (i = 1; i <= n; i++) scanf("%d", &xx[i]);
  for (i = 1; i <= n; i++) scanf("%d", &yy[i]);
  for (i = 1; i <= n; i++) dx[i] = dy[i] = k + 1;
  for (i = 1; i <= n; i++) {
    int x = xx[i], y = yy[i], x_, y_, z;
    if (dx[i - 1] <= k) {
      x_ = x - (k - dx[i - 1]);
      if (x > y)
        z = x_ <= y || x_ <= (y - 1) * k ? 1 : x_ - (y - 1) * k;
      else
        z = y <= x * k ? 1 : k + 1;
      if (dx[i] > z) dx[i] = z;
      if (y > x)
        z = y <= x * k ? 1 : y - x * k;
      else
        z = x_ <= (y - 1) * k ? 1 : k + 1;
      if (dy[i] > z) dy[i] = z;
    }
    if (dy[i - 1] <= k) {
      y_ = y - (k - dy[i - 1]);
      if (y > x)
        z = y_ <= x || y_ <= (x - 1) * k ? 1 : y_ - (x - 1) * k;
      else
        z = x <= y * k ? 1 : k + 1;
      if (dy[i] > z) dy[i] = z;
      if (x > y)
        z = x <= y * k ? 1 : x - y * k;
      else
        z = y_ <= (x - 1) * k ? 1 : k + 1;
      if (dx[i] > z) dx[i] = z;
    }
  }
  printf(dx[n] <= k || dy[n] <= k ? "YES\n" : "NO\n");
  return 0;
}
