#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
const int N = 1e6 + 10;
const long long mod = 1e9 + 7;
const long long mod2 = 998244353;
const long long inf = 8e18;
const int LOG = 22;
long long pw(long long a, long long b, long long M) {
  return (!b ? 1
             : (b & 1 ? (a * pw(a * a % M, b / 2, M)) % M
                      : pw(a * a % M, b / 2, M)));
}
long long a[N], b[N], dp[N][2];
int main() {
  long long n, k;
  scanf("%lld%lld", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &b[i]);
  }
  memset(dp, -1, sizeof dp);
  dp[0][0] = dp[0][1] = 0;
  for (int i = 1; i <= n; i++) {
    long long x = a[i], y = b[i];
    x += dp[i - 1][0];
    if (x <= (b[i] + 1) * k && (a[i] + 1) * k >= b[i]) {
      dp[i][0] = max(0ll, x - b[i] * k);
    }
    y += dp[i - 1][1];
    if (y <= (a[i] + 1) * k && (b[i] + 1) * k >= a[i]) {
      dp[i][1] = max(0ll, y - a[i] * k);
    }
    if (dp[i][0] == -1 || dp[i][1] == -1) {
      return !printf("NO\n");
    }
  }
  printf("YES");
  return 0;
}
