#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000 * 1000 * 1000 + 7LL;
const double EXP = 1e-6;
const int MAX = 100001;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> v, v1;
  for (int i = 0; i < n; i++) {
    int k;
    cin >> k;
    v.push_back(k);
  }
  for (int i = 0; i < n; i++) {
    int k;
    cin >> k;
    v1.push_back(k);
  }
  sort((v).begin(), (v).end());
  sort((v1).begin(), (v1).end());
  vector<int> vec;
  int o = 0;
  for (int i = n - 1; i >= 0; i--) {
    while (o < n && v1[o] + v[i] < m) {
      o++;
    }
    if (o == n) break;
    vec.push_back(v[i] + v1[o]);
    o++;
  }
  cout << 1 << " ";
  cout << vec.size() << endl;
  return 0;
}
