#include <bits/stdc++.h>
using namespace std;
vector<long long> a, b;
int main() {
  long long n, mn, x, j = 0, sum = 0;
  cin >> n >> mn;
  for (int i = 0; i < n; i++) {
    cin >> x;
    a.push_back(x);
  }
  for (int i = 0; i < n; i++) {
    cin >> x;
    b.push_back(x);
  }
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  for (int i = a.size() - 1; i >= 0; i--) {
    for (; j < b.size(); j++) {
      if (a[i] + b[j] >= mn) {
        sum++;
        j++;
        break;
      }
    }
  }
  cout << 1 << " " << sum;
  return 0;
}
