#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, t, j, tmp, n, m, k, count, flag, x, a, b, low, high, mid;
  cin >> n >> x;
  vector<int> ar1(n), ar2(n);
  for (i = 0; i < n; i++) {
    scanf("%d", &tmp);
    ar1[i] = tmp;
  }
  for (i = 0; i < n; i++) {
    scanf("%d", &tmp);
    ar2[i] = tmp;
  }
  sort(ar1.begin(), ar1.end());
  sort(ar2.begin(), ar2.end());
  j = 1;
  for (i = 0; i < n; i++) {
    if (ar1[i] + ar2[n - j] >= x) {
      j++;
    }
  }
  printf("1 %d\n", j - 1);
}
