#include <bits/stdc++.h>
using namespace std;
int F[100000], S[100000];
int main(int argc, char *argv[]) {
  int n, x, adg, i, j, k, L, A, B;
  cin >> n >> x;
  for (i = 0; i < n; i++) cin >> F[i];
  for (i = 0; i < n; i++) cin >> S[i];
  if (n == 1)
    cout << 1 << ' ' << 1;
  else {
    cout << 1 << ' ';
    sort(F, F + n);
    sort(S, S + n);
    adg = 0;
    j = L = 0;
    i = k = n - 1;
    while (adg < n && i >= L && k >= j) {
      A = F[i] + S[j];
      B = S[k] + F[L];
      if (A >= B && A >= x) {
        adg++;
        i--;
        j++;
      } else if (B > A && B >= x) {
        adg++;
        k--;
        L++;
      } else if (A < B)
        j++;
      else
        L++;
    }
    cout << adg;
  }
  return EXIT_SUCCESS;
}
