#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
int n, m, a[N], b[N];
long long f, g;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = (1); i <= (n); i++) scanf("%d", &a[i]);
  for (int i = (1); i <= (n); i++) scanf("%d", &b[i]);
  for (int i = (1); i <= (n); i++) {
    f = max(0ll, f + a[i] - (long long)m * b[i]);
    g = max(0ll, g + b[i] - (long long)m * a[i]);
    if (f > m || g > m) return puts("NO"), 0;
  }
  puts("YES");
  return 0;
}
