#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
int main() {
  std::ios_base::sync_with_stdio(false);
  int n, K;
  cin >> n >> K;
  vector<long long> a(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<long long> b(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> b[i];
  }
  vector<vector<long long>> f(n + 1, vector<long long>(2, inf));
  f[0][0] = f[0][1] = 0;
  for (int i = 0; i < n; i++) {
    if (f[i][0] != inf) {
      if (a[i] * K >= b[i]) {
        if (b[i] * K >= a[i] + f[i][0] - 1) {
          f[i + 1][0] = 1;
        } else if ((b[i] + 1) * K >= a[i] + f[i][0]) {
          f[i + 1][0] = a[i] + f[i][0] - b[i] * K;
        }
      }
      if (b[i] * K >= a[i] + f[i][0]) {
        if (a[i] * K >= b[i] - 1) {
          f[i + 1][1] = 1;
        } else if ((a[i] + 1) * K >= b[i]) {
          f[i + 1][1] = b[i] - a[i] * K;
        }
      }
    }
    if (f[i][1] != inf) {
      if (a[i] * K >= b[i] + f[i][1]) {
        if (b[i] * K >= a[i] - 1) {
          f[i + 1][0] = 1;
        } else if ((b[i] + 1) * K >= a[i]) {
          f[i + 1][0] = min(f[i + 1][0], a[i] - b[i] * K);
        }
      }
      if (b[i] * K >= a[i]) {
        if (a[i] * K >= b[i] + f[i][1] - 1) {
          f[i + 1][1] = 1;
        } else if ((a[i] + 1) * K >= b[i] + f[i][1]) {
          f[i + 1][1] = min(f[i + 1][1], b[i] + f[i][1] - a[i] * K);
        }
      }
    }
  }
  cout << (f[n][1] != inf || f[n][0] != inf ? "YES" : "NO") << endl;
  return 0;
}
