#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  cin >> n >> x;
  int best = 1, worst;
  int i, a[n], b[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (i = 0; i < n; i++) {
    cin >> b[i];
  }
  int start = 0, end = n - 1;
  worst = n;
  sort(a, a + n);
  sort(b, b + n);
  while (start < n) {
    if ((a[start] + b[end]) >= x) {
      start++;
      end--;
    } else {
      start++;
      worst--;
    }
  }
  cout << best << " " << worst << endl;
  return 0;
}
