#include <bits/stdc++.h>
using namespace std;
void ASS(bool bb) {
  if (!bb) {
    ++*(int*)0;
  }
}
#pragma comment(linker, "/STACK:106777216")
int read() {
  int x;
  scanf("%d", &x);
  return x;
}
void Sort(vector<int>& a) {
  static int cnt[1 << 17];
  memset(cnt, 0, sizeof(cnt));
  for (int i = 0; i < (int)(a.size()); i++) cnt[a[i]]++;
  int pos = 0;
  for (int i = 0; i < (int)((1 << 17)); i++)
    while (cnt[i]-- > 0) a[pos++] = i;
}
int main() {
  int n = read();
  int x = read();
  vector<int> a(n);
  vector<int> b(n);
  for (int i = 0; i < (int)(n); i++) a[i] = read();
  for (int i = 0; i < (int)(n); i++) b[i] = read();
  Sort(a);
  Sort(b);
  const int Best = 1;
  int Worst = 0;
  int pos = n - 1;
  for (int i = 0; i < (int)(n); i++)
    if (pos >= 0 && a[i] + b[pos] >= x) {
      Worst++;
      pos--;
    }
  cout << Best << " " << Worst << endl;
  return 0;
}
