#include <bits/stdc++.h>
using namespace std;
const int INF = 999999999;
const double EPSILON = 0.00000001;
int main() {
  int n, x;
  cin >> n >> x;
  vector<int> a(n);
  multiset<int> b;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 0; i < n; i++) {
    int z;
    scanf("%d", &z);
    b.insert(z);
  }
  sort(a.begin(), a.end());
  multiset<int>::iterator bestb;
  int besta;
  int close = INF;
  for (int i = 0; i < a.size(); i++) {
    multiset<int>::iterator it = b.upper_bound(x - a[i] - 1);
    if (it != b.end() and *it + a[i] - x < close) {
      close = *it + a[i] - x;
      bestb = it;
      besta = i;
    }
  }
  int vasya = a[besta] + *bestb;
  b.erase(bestb);
  int greater = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (i != besta) {
      multiset<int>::iterator it = b.upper_bound(vasya - a[i] - 1);
      if (it != b.end()) {
        b.erase(it);
        greater++;
      }
    }
  }
  cout << "1 " << greater + 1 << endl;
  return 0;
}
