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