#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int a[N], b[N];
int main(void) {
  int n, x;
  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 j = 0, ok = 0;
  for (int i = n - 1; i >= 0; i--) {
    while (j < n && a[i] + b[j] < x) ++j;
    if (j < n) ++ok;
    ++j;
  }
  printf("1 %d\n", ok);
  return 0;
}
