#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double eps = 1e-6;
const int MAXN = 3e5 + 10;
const int MAXM = 2e5 + 10;
const long long mod = 1e9 + 7;
long long x[MAXN], y[MAXN];
int main() {
  int n;
  long long k;
  scanf("%d%lld", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%lld", &x[i]);
  for (int i = 1; i <= n; i++) scanf("%lld", &y[i]);
  long long nowx = -k, nowy = -k;
  for (int i = 1; i <= n; i++) {
    nowx += x[i] - y[i] * k;
    nowy += y[i] - x[i] * k;
    if (nowx < -k) nowx = -k;
    if (nowy < -k) nowy = -k;
    if (nowx > 0 || nowy > 0) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
  return 0;
}
