#include <bits/stdc++.h>
using namespace std;
int ff[100111];
int ss[100111];
int main() {
  int n, x;
  scanf("%d", &n), scanf("%d", &x);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &ff[i]);
  }
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &ss[i]);
  }
  sort(ff + 1, ff + 1 + n);
  sort(ss + 1, ss + 1 + n);
  int l = 1, r = n, cnt = 0;
  while (l <= n && r >= 1) {
    if (ff[l] == -1) {
      ++l;
      continue;
    }
    if (ss[r] == -1) {
      --r;
      continue;
    }
    if (ff[l] + ss[r] >= x) {
      ++cnt;
      ff[l] = -1;
      ++l;
      ss[r] = -1;
      --r;
    } else {
      ++l;
    }
  }
  l = 1, r = n;
  while (l <= n && r >= 1) {
    if (ss[l] == -1) {
      ++l;
      continue;
    }
    if (ff[r] == -1) {
      --r;
      continue;
    }
    if (ss[l] + ff[r] >= x) {
      ++cnt;
      ss[l] = -1;
      ++l;
      ff[r] = -1;
      --r;
    } else {
      ++l;
    }
  }
  printf("%d %d", 1, cnt);
  return 0;
}
