#include <bits/stdc++.h>
using namespace std;
vector<int> arr1, arr2;
int main() {
  int n, x, ans = 0;
  cin >> n >> x;
  arr1.resize(n);
  arr2.resize(n);
  for (int i = 0; i < n; i++) cin >> arr1[i];
  for (int i = 0; i < n; i++) cin >> arr2[i];
  sort(arr1.begin(), arr1.end());
  sort(arr2.begin(), arr2.end());
  for (int i = 0, j = n - 1; i < n && j >= 0; i++) {
    if (arr1[i] + arr2[j] >= x) {
      ans++;
      j--;
    }
  }
  cout << "1 " << ans;
  return 0;
}
