#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
int x[N], y[N], n;
long long k;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k;
  for (register int i = (1); i <= (n); ++i) cin >> x[i];
  for (register int i = (1); i <= (n); ++i) cin >> y[i];
  int tx = 0, ty = 0;
  for (register int i = (1); i <= (n); ++i) {
    tx = max(0ll, x[i] - (k * y[i] - tx));
    ty = max(0ll, y[i] - (k * x[i] - ty));
    if (tx > k || ty > k) {
      cout << "NO" << '\n';
      return 0;
    }
  }
  cout << "YES" << '\n';
  return 0;
}
