#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, x;
  cin >> n >> x;
  long long a[n], b[n];
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (int i = 0; i < n; ++i) cin >> b[i];
  sort(a, a + n, greater<int>());
  sort(b, b + n);
  long long ans = 0, f, id = 0;
  for (int i = 0; i < n; ++i) {
    f = 0;
    while (id < n) {
      if (a[i] + b[id] >= x) {
        f = 1;
        ++id;
        break;
      }
      ++id;
    }
    if (f)
      ++ans;
    else
      break;
  }
  cout << "1 " << ans << '\n';
  return 0;
}
