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