#include <bits/stdc++.h>
using namespace std;
int p1[100010], p2[100010];
int main() {
  int n, x;
  scanf("%d %d", &n, &x);
  for (int i = 0; i < n; i++) scanf("%d", &p1[i]);
  for (int i = 0; i < n; i++) scanf("%d", &p2[i]);
  sort(p1, p1 + n);
  sort(p2, p2 + n);
  int i, j, k;
  for (i = 0, j = n - 1, k = 0; i < n && j >= 0;) {
    if (p1[i] + p2[j] >= x) {
      k++, i++, j--;
    } else
      i++;
  }
  printf("1 %d\n", k);
  return 0;
}
