#include <bits/stdc++.h>
using namespace std;
int n, a[100010], b[100010], x, res, l, r;
int main() {
  cin >> n >> x;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  sort(a, a + n);
  sort(b, b + n);
  r = n - 1;
  for (int i = 0; i < n; i++) {
    if (a[i] + b[r] >= x) {
      r--;
      res++;
    }
  }
  cout << 1 << " " << res << endl;
}
