#include <bits/stdc++.h>
using namespace std;
template <typename T>
void dbg_vector(const T& v) {
  for (size_t i = 0; i < v.size(); ++i) cout << v[i] << " ";
  cout << endl;
}
void dbg() { cerr << endl; }
template <typename Head, typename... Tail>
void dbg(Head H, Tail... T) {
  cerr << H << ' ';
  dbg(T...);
}
struct pair_hash {
  template <class T1, class T2>
  size_t operator()(const pair<T1, T2>& p) const {
    auto h1 = std::hash<T1>{}(p.first);
    auto h2 = std::hash<T2>{}(p.second);
    return h1 ^ h2;
  }
};
struct Comparator {
  template <class T1, class T2>
  bool operator()(const std::pair<T1, T2>& lhs,
                  const std::pair<T1, T2>& rhs) const {
    if (lhs.first == rhs.first)
      return lhs.second < rhs.second;
    else
      return lhs.first < rhs.first;
  }
};
inline long long lmin(long long a, long long b) {
  if (a < b) return a;
  return b;
}
inline long long lmax(long long a, long long b) {
  if (a > b) return a;
  return b;
}
long long INF = 1e18;
long long MOD = 998244353;
struct edge {
  long long w, x, y;
  edge(){};
  edge(long long w, long long x, long long y) : w(w), x(x), y(y){};
};
struct EdgeComparator {
  bool operator()(const edge& lhs, const edge& rhs) const {
    if (lhs.w < rhs.w) return true;
    return false;
  }
};
int main() {
  long long n, k;
  cin >> n >> k;
  vector<long long> x(n + 1), y(n + 1);
  for (int i = 1; i <= n; ++i) cin >> x[i];
  for (int i = 1; i <= n; ++i) cin >> y[i];
  vector<long long> f(n + 1), g(n + 1);
  for (int i = 1; i <= n; ++i) {
    f[i] = lmax(0, f[i - 1] + x[i] - k * y[i]);
    g[i] = lmax(0, g[i - 1] + y[i] - k * x[i]);
    if (f[i] > k || g[i] > k) {
      cout << "NO\n";
      return 0;
    }
  }
  cout << "YES\n";
}
