#include <bits/stdc++.h>
using namespace std;
int n, k, a[200000], b[200000];
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cin >> b[i];
  sort(a + 1, a + n + 1);
  sort(b + 1, b + n + 1, greater<int>());
  int ind1 = 1, ind2 = 1, cnt = 0;
  while (ind2 <= n) {
    while (ind1 <= n and a[ind1] + b[ind2] < k) ind1++;
    if (ind1 > n) break;
    ind1++;
    cnt++;
    ind2++;
  }
  cout << 1 << " " << cnt << endl;
}
