#include <bits/stdc++.h>
using namespace std;
int fst[100001], snd[100001];
int Binary_Search(int *arr, int len, int approach) {
  int l = 0, r = len - 1;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (arr[mid] > approach) {
      r = mid - 1;
    } else if (arr[mid] < approach) {
      l = mid + 1;
    } else {
      return mid;
    }
  }
  if (l >= len) return 2047483647;
  return l;
}
int main() {
  int n, x;
  scanf("%d%d", &n, &x);
  for (int i = 0; i < n; ++i) scanf("%d", &fst[i]);
  for (int i = 0; i < n; ++i) scanf("%d", &snd[i]);
  sort(fst, fst + n), sort(snd, snd + n);
  printf("1 ");
  int lowest = 0x7fffffff;
  int pos_fst, pos_snd;
  for (int i = 0; i < n; ++i) {
    int tmp;
    tmp = Binary_Search(snd, n, x - fst[i]);
    if (tmp != 2047483647) {
      lowest = std::min(snd[tmp] + fst[i], lowest);
      if (fst[i] + snd[tmp] == lowest) {
        pos_fst = i, pos_snd = tmp;
      }
      if (lowest == x) break;
    }
  }
  for (int i = pos_fst; i < n; ++i) fst[i] = fst[i + 1];
  for (int i = pos_snd; i < n; ++i) snd[i] = snd[i + 1];
  int cnt = 0;
  n--;
  int j = 0;
  for (int i = n - 1; i >= 0; --i) {
    while (fst[i] + snd[j] < lowest) j++;
    if (j < n)
      cnt++;
    else
      break;
    j++;
  }
  printf("%d\n", cnt + 1);
  return 0;
}
