#include <bits/stdc++.h>
using namespace std;
long long dp[300005][2];
long long num[300005][2];
int main() {
  memset(dp, -1, sizeof(dp));
  long long n, k;
  cin >> n >> k;
  for (int j = 0; j < 2; j++) {
    for (int i = 1; i <= n; i++) cin >> num[i][j];
  }
  dp[0][1] = 0;
  dp[0][0] = 0;
  bool ans = 0;
  for (int i = 1; i <= n; i++) {
    dp[i][0] = max(num[i][0] - (k - dp[i - 1][0]) - k * (num[i][1] - 1), 0LL);
    dp[i][1] = max(num[i][1] - (k - dp[i - 1][1]) - k * (num[i][0] - 1), 0LL);
    if (dp[i][0] > k || dp[i][1] > k) ans = 1;
  }
  if (ans)
    cout << "NO\n";
  else
    cout << "YES\n";
}
