#include <bits/stdc++.h>
using namespace std;
long long n, k, a[1000000], b[1000000], f1[1000000], f2[1000000];
int main() {
  scanf("%lld%lld", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  for (int i = 1; i <= n; i++) scanf("%lld", &b[i]);
  for (int i = 1; i <= n; i++) {
    f1[i] = max(0ll, a[i] - k * b[i] + f1[i - 1]);
    f2[i] = max(0ll, b[i] - k * a[i] + f2[i - 1]);
    if (max(f2[i], f1[i]) > k) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
}
