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