#include <bits/stdc++.h>
const int maxn = 3e5 + 5;
using namespace std;
int n, flag;
long long k;
long long a[maxn], b[maxn];
int main() {
  scanf("%d%lld", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
  long long x = 0, y = 0;
  for (int i = 1; i <= n; i++) {
    x += a[i] - k * b[i];
    y += b[i] - k * a[i];
    x = max(x, 0LL);
    y = max(y, 0LL);
    if (x > k || y > k) {
      flag = 1;
      break;
    }
  }
  puts(!flag ? "YES" : "NO");
  return 0;
}
