#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, k, z = 0;
  cin >> n >> k;
  long long a[n], b[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  long long dp[n][2];
  dp[0][0] = max(a[0] - b[0] * k, z);
  dp[0][1] = max(z, b[0] - k * a[0]);
  if (dp[0][0] > k || dp[0][1] > k) {
    cout << "NO";
    return 0;
  }
  for (int i = 1; i < n; i++) {
    dp[i][0] = max(dp[i - 1][0] + a[i] - b[i] * k, z);
    dp[i][1] = max(z, dp[i - 1][1] + b[i] - a[i] * k);
    if (dp[i][0] > k || dp[i][1] > k) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
