#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 17;
int n, x, a[maxn], b[maxn], cnt;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cin >> n >> x;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  sort(a, a + n);
  sort(b, b + n);
  for (int i = n - 1, ptr = 0; i >= 0; i--) {
    while (ptr < n && a[i] + b[ptr] < x) ptr++;
    if (ptr < n) ptr++, cnt++;
  }
  cout << 1 << ' ' << cnt << '\n';
  return 0;
}
