#include <bits/stdc++.h>
using namespace std;
int v1[100010], v2[100010];
int main() {
  int n, x, cnt = 0;
  cin >> n >> x;
  for (int i = 0; i < n; ++i) cin >> v1[i];
  for (int i = 0; i < n; ++i) cin >> v2[i];
  sort(v1, v1 + n);
  sort(v2, v2 + n, greater<int>());
  int j = 0;
  for (int i = 0; i != n && j != n; i++) {
    if (v1[i] + v2[j] >= x) {
      j++;
      cnt++;
    }
  }
  cout << "1"
       << " " << cnt << endl;
  return 0;
}
