#include <bits/stdc++.h>
using namespace std;
int n, x;
int a[100000], b[100000];
int gao() {
  int ret = 0;
  for (int i = 0, j = n - 1; i < n && j >= 0; ++i) {
    if (a[i] + b[j] >= x) {
      ++ret;
      --j;
    }
  }
  return ret;
}
int main() {
  scanf("%d%d", &n, &x);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", &b[i]);
  }
  sort(a, a + n);
  sort(b, b + n);
  int res = 0;
  res = max(res, gao());
  for (int i = 0; i < n; ++i) {
    swap(a[i], b[i]);
  }
  res = max(res, gao());
  printf("1 %d\n", res);
  return 0;
}
