#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = 10 * x + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
int power(int x, int y) {
  int t = 1;
  for (; y; y >>= 1, x = x * x % 1000000007)
    if (y & 1) t = t * x % 1000000007;
  return t;
}
int n, k;
int x[300005], y[300005];
int main() {
  n = read();
  k = read();
  for (int i = 1; i <= (n); i++) x[i] = read();
  for (int i = 1; i <= (n); i++) y[i] = read();
  long long lastx = 0, lasty = 0;
  for (int i = 1; i <= (n); i++) {
    long long tmp1 = x[i] - (k - lastx) - (long long)((long long)y[i] - 1) * k;
    long long tmp2 = y[i] - (k - lasty) - (long long)((long long)x[i] - 1) * k;
    tmp1 = tmp1 < 0 ? 0 : tmp1;
    tmp2 = tmp2 < 0 ? 0 : tmp2;
    lastx = tmp1;
    lasty = tmp2;
    if (tmp1 > k || tmp2 > k) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
