#include <bits/stdc++.h>
using namespace std;
long a[100003], b[100003], c[100003];
bool cmp(long u, long v) { return u > v; }
int main() {
  std::ios::sync_with_stdio(false);
  long i, j, k, m, n, u, v;
  cin >> n >> m;
  for (i = 1; i <= n; ++i) cin >> a[i];
  for (i = 1; i <= n; ++i) cin >> b[i];
  sort(a + 1, a + n + 1);
  sort(b + 1, b + n + 1, cmp);
  for (u = v = 1; u <= n; ++u)
    if (a[u] + b[v] >= m) ++v;
  cout << "1 " << (v - 1) << endl;
  return 0;
}
