#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, vmin, temp, pmax, pmin, cmin, cmax;
  int p[100005], q[100005];
  cin >> n >> vmin;
  for (int i = 0; i < n; i++) {
    cin >> p[i];
  }
  sort(p, p + n);
  for (int i = 0; i < n; i++) {
    cin >> q[i];
  }
  sort(q, q + n);
  int res = 0;
  for (int i = n - 1, j = 0; i >= 0; --i) {
    while (j < n && p[i] + q[j] < vmin) {
      j++;
    }
    if (j < n) {
      j++;
      res++;
    }
  }
  cout << "1 " << res << endl;
  return 0;
}
