#include <bits/stdc++.h>
using namespace std;
long long f[1000005], t[1000005];
long long cntf[1000005], cntt[1000005];
int main() {
  long long k;
  int n;
  cin >> n >> k;
  for (register int i = 1; i <= n; i += 1) scanf("%lld", &cntf[i]);
  for (register int i = 1; i <= n; i += 1) scanf("%lld", &cntt[i]);
  for (register int i = 1; i <= n; i += 1) {
    f[i] = max(0ll, cntf[i] + f[i - 1] - k * cntt[i]);
    t[i] = max(0ll, cntt[i] + t[i - 1] - k * cntf[i]);
    if (t[i] > k || f[i] > k) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
