#include <bits/stdc++.h>
using namespace std;
int a[200000];
int main() {
  int n, m, i, tem;
  multiset<int> v;
  cin >> n >> m;
  multiset<int>::iterator it;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (i = 1; i <= n; i++) {
    cin >> tem;
    v.insert(tem);
  }
  sort(a, a + n);
  int sum = 0;
  for (i = n; i >= 1; i--) {
    tem = m - a[i];
    it = v.lower_bound(tem);
    if (it != v.end()) {
      sum++;
      v.erase(it);
    }
  }
  cout << 1 << " " << sum << endl;
  return 0;
}
