#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int sum = 0, fg = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') fg = -1;
  for (; isdigit(c); c = getchar()) sum = (sum << 3) + (sum << 1) + (c ^ 0x30);
  return fg * sum;
}
const int maxn = 3e5 + 10;
int n, m, a[maxn], b[maxn];
long long x, y;
int main() {
  n = read(), m = read();
  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++) {
    x = max(x + a[i] - (long long)m * b[i], 0LL);
    y = max(y + b[i] - (long long)m * a[i], 0LL);
    if (x > m || y > m) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
