#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int n, x;
vector<int> a, b;
void solve() {
  set<pair<int, int> > B;
  for (int i = 0; i < n; i++) {
    B.insert(make_pair(b[i], i));
  }
  int minSum = 1000000000;
  for (int i = 0; i < n; i++) {
    set<pair<int, int> >::iterator it = B.lower_bound(make_pair(x - a[i], 0));
    if (it == B.end()) continue;
    minSum = min(minSum, a[i] + it->first);
  }
  int cnt = 0;
  for (int i = n - 1; i >= 0; i--) {
    set<pair<int, int> >::iterator it =
        B.lower_bound(make_pair(minSum - a[i], 0));
    if (it == B.end()) continue;
    cnt++;
    B.erase(it);
  }
  cout << 1 << ' ' << cnt << endl;
}
int main() {
  while (cin >> n >> x) {
    a = vector<int>(n);
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
    }
    b = vector<int>(n);
    for (int i = 0; i < n; i++) {
      scanf("%d", &b[i]);
    }
    solve();
  }
}
