#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(false), cin.tie(nullptr);
  ;
  int n, x;
  cin >> n >> x;
  int a[n], b[n], ans = 0;
  ;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  sort(a, a + n, greater<int>());
  sort(b, b + n);
  for (int i = 0, j = 0; i < n; i++) {
    while (j < n && a[i] + b[j] < x) {
      j++;
    }
    if (j < n && a[i] + b[j] >= x) {
      ans++;
      j++;
    }
  }
  cout << 1 << " " << ans << "\n";
}
