#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f, mod = 1000000007;
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
const double pi = acosl(-1.), eps = 1e-9;
inline int power(int a, int b, int m = mod, int ans = 1) {
  for (; b; b >>= 1, a = 1LL * a * a % m)
    if (b & 1) ans = 1LL * ans * a % m;
  return ans;
}
const int NN = 300030;
long long first[NN];
long long second[NN];
int main() {
  long long n, k;
  scanf("%I64d%I64d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%I64d", first + i);
  for (int i = 1; i <= n; i++) scanf("%I64d", second + i);
  long long a = 0, b = 0, c, d;
  for (int i = 1; i <= n; i++) {
    c = a;
    d = b;
    a = 0;
    b = 0;
    a = max(0ll, first[i] - (second[i] * k - c));
    b = max(0ll, second[i] - (first[i] * k - d));
    if (a && b) return puts("NO"), 0;
    if (a > k || b > k) return puts("NO"), 0;
  }
  puts("YES");
  return 0;
}
