#include <bits/stdc++.h>
using namespace std;
const int MAXN = 101 * 1000;
int n, x, a[MAXN], b[MAXN];
int worst() {
  sort(a, a + n, greater<int>());
  multiset<int> st(b, b + n);
  int tot = 0;
  for (int i = (0); i < int(n); ++i) {
    multiset<int>::iterator it = st.lower_bound(x - a[i]);
    if (it == st.end()) break;
    tot++;
    st.erase(it);
  }
  return tot;
}
int main() {
  cin >> n >> x;
  for (int i = (0); i < int(n); ++i) cin >> a[i];
  for (int i = (0); i < int(n); ++i) cin >> b[i];
  cout << 1 << " " << worst() << endl;
  return 0;
}
