#include <bits/stdc++.h>
using namespace std;
int a[100009], b[100009];
int n;
void in(int& x) {
  int k = 0;
  char c;
  x = 0;
  while (c = getchar()) {
    if (c >= '0' && c <= '9') {
      x = x * 10 + c - '0';
      k = 1;
    } else if (k == 1)
      break;
  }
}
int bs(int* a, int l, int r, int x) {
  int mid;
  while (l < r) {
    mid = (l + r) / 2;
    if (a[mid] >= x)
      r = mid - 1;
    else
      l = mid + 1;
  }
  l = max(0, l);
  l = min(n - 1, l);
  return l;
}
int main() {
  int x;
  scanf("%d %d", &n, &x);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  for (int i = 0; i < n; i++) scanf("%d", b + i);
  sort(a, a + n);
  sort(b, b + n);
  int ans = 0;
  int j = n - 1;
  for (int i = 0; i < n; i++) {
    if (j < 0) break;
    if (b[j] + a[i] < x)
      continue;
    else
      ans++, j--;
  }
  printf("%d %d\n", 1, ans);
  return 0;
}
