#include <bits/stdc++.h>
using namespace std;
int n, K, a[300005], b[300005], A, B;
int main() {
  scanf("%d%d", &n, &K);
  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++) {
    A = max(0LL, A + a[i] - (long long)b[i] * K);
    B = max(0LL, B + b[i] - (long long)a[i] * K);
    if (A > K || B > K) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
}
