#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  int n, k, arrU[100001], arrD[100001];
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> arrU[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> arrD[i];
  }
  sort(&arrU[0], &arrU[n]);
  sort(&arrD[0], &arrD[n]);
  int temp[100001];
  for (int i = 0; i < n; i++) {
    temp[n - i - 1] = arrU[i];
  }
  for (int i = 0; i < n; i++) {
    arrU[i] = temp[i];
  }
  for (int i = 0; i < n; i++) {
    temp[n - i - 1] = arrD[i];
  }
  for (int i = 0; i < n; i++) {
    arrD[i] = temp[i];
  }
  int p = n - 1;
  int maxx = 1;
  cout << "1 ";
  for (int i = 0; i < n; i++) {
    while ((arrU[i] + arrD[p] < k) && (p >= 0)) {
      p--;
    }
    if (p < 0) break;
    int p2 = p - 1;
    int cnt = 1;
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      while ((arrU[j] + arrD[p2] < k) && (p2 >= 0)) {
        p2--;
      }
      if (p2 < 0) break;
      cnt++;
      p2--;
      if (cnt > maxx) {
        maxx = cnt;
      }
    }
    break;
  }
  cout << maxx;
  return 0;
}
