#include <bits/stdc++.h>
using namespace std;
int a[100001], b[100001], sum[100001];
int main() {
  int n, x;
  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);
  int cnt = 0;
  int idxa = 0, idxb = n - 1;
  while (idxa < n && idxb >= 0) {
    while (a[idxa] + b[idxb] < x) idxa++;
    if (idxa < n) {
      idxa++;
      cnt++;
      idxb--;
    }
  }
  cout << 1 << " " << cnt << endl;
  return 0;
}
