#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
long long a[300010], b[300010], dp1[300010], dp2[300010], k;
int main() {
  ios::sync_with_stdio(false);
  cout.tie(0);
  int n;
  long long k;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cin >> b[i];
  for (int i = 1; i <= n; i++) {
    dp2[i] = max(a[i] - (b[i] * k - dp2[i - 1]), 0ll);
    dp1[i] = max(b[i] - (a[i] * k - dp1[i - 1]), 0ll);
    if (dp1[i] > k || dp2[i] > k) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
  return 0;
}
