#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, k;
  cin >> n >> k;
  long long t[n], f[n];
  for (long long i = 0; i < n; i++) cin >> t[i];
  for (long long i = 0; i < n; i++) cin >> f[i];
  long long tt = 0, first = 0;
  for (long long i = 0; i < n; i++) {
    tt = max(t[i] + tt - k * f[i], 0ll);
    first = max(f[i] + first - k * t[i], 0ll);
    if (tt > k || first > k) return cout << "NO" << endl, 0;
  }
  return cout << "YES" << endl, 0;
}
