#include <bits/stdc++.h>
using namespace std;
const int M = 3e5 + 5;
int arr[M];
int a[M], b[M];
int32_t main() {
  int n, x;
  cin >> n >> x;
  int ptr = 0;
  multiset<int> ms;
  for (int i = 0; i < n; i++) cin >> a[i], ms.insert(a[i]);
  for (int i = 0; i < n; i++) cin >> b[i];
  sort(b, b + n);
  reverse(b, b + n);
  int cnr = 0;
  for (int i = 0; i < n; i++) {
    int t = x - b[i];
    auto it = ms.lower_bound(t);
    if (it != ms.end()) {
      cnr++;
      ms.erase(it);
    } else
      break;
  }
  return cout << 1 << ' ' << cnr << endl, 0;
}
