#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
int n, K, a[N], b[N];
long long f[N];
int main() {
  int i, j, la, ra, lb, rb, x, y, pr = 0;
  scanf("%d%d", &n, &K);
  for (i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (i = 1; i <= n; ++i) scanf("%d", &b[i]);
  for (i = 1; i <= n; ++i) {
    f[i] = max(0LL, f[i - 1] + a[i] - (long long)K * b[i]);
    if (f[i] > K) {
      puts("NO");
      return 0;
    }
  }
  for (i = 1; i <= n; ++i) {
    f[i] = max(0LL, f[i - 1] + b[i] - (long long)K * a[i]);
    if (f[i] > K) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
}
