#include <bits/stdc++.h>
int N, K, x[300001], y[300001], a, b, _a, _b;
int same(int a, int x, int y) {
  if (y > (long long)x * K) return K + 1;
  if (a + x <= (long long)y * K)
    return 1;
  else
    return std::min(K + 1, a + x - y * K);
}
int diff(int a, int x, int y) {
  if (a + x > (long long)y * K) return K + 1;
  if (y <= (long long)x * K)
    return 1;
  else
    return std::min(K + 1, y - x * K);
}
int main() {
  scanf("%d%d", &N, &K);
  for (int i = 1; i <= N; i++) scanf("%d", x + i);
  for (int i = 1; i <= N; i++) scanf("%d", y + i);
  for (int i = 1; i <= N; i++) {
    _a = _b = K + 1;
    if (a != K + 1) {
      _a = std::min(_a, same(a, x[i], y[i]));
      _b = std::min(_b, diff(a, x[i], y[i]));
    }
    if (b != K + 1) {
      _a = std::min(_a, diff(b, y[i], x[i]));
      _b = std::min(_b, same(b, y[i], x[i]));
    }
    a = _a;
    b = _b;
    if (a == K + 1 && b == K + 1) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
  return 0;
}
