#include <bits/stdc++.h>
using namespace std;
int n, x;
vector<int> a;
multiset<int> b;
int main() {
  scanf("%d%d", &n, &x);
  for (int ii = 0; ii < n; ii++) {
    int t;
    scanf("%d", &t);
    a.push_back(t);
  }
  for (int ii = 0; ii < n; ii++) {
    int t;
    scanf("%d", &t);
    b.insert(t);
  }
  sort(a.begin(), a.end());
  int cnt = 0;
  for (auto t : a) {
    auto p = b.lower_bound(x - t);
    if (p != b.end()) cnt++, b.erase(p);
  }
  cout << 1 << " " << cnt << endl;
}
