#include <bits/stdc++.h>
using namespace std;
inline void Boost() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
int cmpFnc(const int a, const int b) { return a > b; }
int main() {
  Boost();
  int n, x;
  cin >> n >> x;
  vector<int> a(n);
  vector<int> b(n);
  for (auto& it : a) cin >> it;
  for (auto& it : b) cin >> it;
  sort(a.begin(), a.end(), cmpFnc);
  sort(b.begin(), b.end(), cmpFnc);
  int i = 0, j = n - 1, ans = 0;
  while (i < n && j >= 0) {
    if (a[i] + b[j] < x) {
      --j;
    } else {
      ans++;
      i++;
      j--;
    }
  }
  cout << 1 << " " << ans;
  return 0;
}
