#include <bits/stdc++.h>
using namespace std;
int A[100005], B[100005], n, i, k, l, m, r;
int main() {
  cin >> n >> k;
  for (i = 1; i <= n; i++) cin >> A[i];
  for (i = 1; i <= n; i++) cin >> B[i];
  sort(A + 1, A + n + 1);
  sort(B + 1, B + n + 1);
  reverse(A + 1, A + n + 1);
  reverse(B + 1, B + n + 1);
  l = 1;
  r = n + 1;
  while (l + 1 < r) {
    m = l + r >> 1;
    for (i = 1; i <= m; i++)
      if (A[i] + B[m - i + 1] < k) break;
    if (i == m + 1)
      l = m;
    else
      r = m;
  }
  cout << "1 " << l;
  return 0;
}
