#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-7;
const int INF = 123456789;
const int MAXN = 1000000;
bool rev(int a, int b) { return a > b; }
int main() {
  int n, x;
  cin >> n >> x;
  vector<int> a(n), b(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
  }
  sort(a.begin(), a.end(), rev);
  sort(b.begin(), b.end());
  int ans = 0;
  int l = 0, r = 0;
  while (l < n) {
    while (r < n && a[l] + b[r] < x) {
      ++r;
    }
    if (r < n && a[l] + b[r] >= x) {
      ++ans;
    }
    ++l;
    ++r;
  }
  cout << 1 << ' ' << ans << endl;
}
