#include <bits/stdc++.h>
using namespace std;
const int MAXN = 3e5 + 10;
long long n, k, a[MAXN][2], dp[MAXN][2];
inline char *ans() {
  for (int i = 1; i <= n; ++i) {
    dp[i][0] = max(0ll, dp[i - 1][0] + a[i][0] - k * a[i][1]);
    dp[i][1] = max(0ll, dp[i - 1][1] + a[i][1] - k * a[i][0]);
    if (dp[i][0] > k || dp[i][1] > k) return "NO";
  }
  return "YES";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) cin >> a[i][0];
  for (int i = 1; i <= n; ++i) cin >> a[i][1];
  cout << ans();
  cout.flush();
  return 0;
}
