#include <bits/stdc++.h>
using namespace std;
int n, x;
int a[100001], b[100001];
int main() {
  cin >> n >> x;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  sort(a, a + n);
  sort(b, b + n);
  int l = 0, r = n - 1, ans = 0;
  while (l < n && r >= 0) {
    if (a[l] + b[r] >= x)
      ans++, l++, r--;
    else
      l++;
  }
  cout << 1 << " " << ans << "\n";
  return 0;
}
