#include <bits/stdc++.h>
using namespace std;
int a[100000], b[100000];
int main() {
  int n, x, w = 0;
  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 l = n - 1, h = 0;
  while (l != -1 && h != n) {
    if (a[l] + b[h] >= x) {
      ++w;
      ++h;
      --l;
    } else
      ++h;
  }
  printf("1 %d", w);
  return 0;
}
