#include <bits/stdc++.h>
int n, x;
int i, j, k, l;
int mi = 0x5fffffff, ma, cnt;
std::vector<int> a, b;
std::vector<int>::const_iterator tit;
std::multiset<int>::const_iterator it, itt;
bool done[100011];
std::list<int> to;
std::list<int>::const_iterator lit;
int main() {
  scanf("%d %d", &n, &x);
  a.reserve(n);
  b.reserve(n);
  for (i = 0; i < n; ++i) {
    scanf("%d", &j);
    a.push_back(j);
  }
  for (i = 0; i < n; ++i) {
    scanf("%d", &j);
    b.push_back(j);
  }
  std::sort(a.begin(), a.end());
  std::sort(b.begin(), b.end());
  for (i = 0; i < n; ++i)
    if (!done[a[i]]) {
      done[a[i]] = true;
      if ((tit = std::lower_bound(b.begin(), b.end(), x - a[i])) != b.end())
        if ((k = a[i] + *tit) < mi) {
          mi = k;
          to.clear();
          to.push_back(a[i]);
          l = a[i];
        } else if (k == mi)
          to.push_back(a[i]);
    }
  {
    std::multiset<int> aa(a.begin(), a.end());
    std::multiset<int> bb(b.begin(), b.end());
    aa.erase(aa.find(l));
    bb.erase(bb.find(mi - l));
    cnt = 1;
    for (it = aa.begin(); it != aa.end(); ++it)
      if ((itt = bb.lower_bound(mi - *it)) != bb.end()) {
        ++cnt;
        bb.erase(itt);
      }
    ma = std::max(cnt, ma);
  }
  printf("1 %d\n", ma);
  return 0;
}
