#include <bits/stdc++.h>
using namespace std;
int a[100005], b[100005];
int main() {
  int n, 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 left = 0, rank = 0;
  for (int i = n - 1; i >= 0; i--) {
    while (left < n && a[left] + b[i] < x) left++;
    if (left < n) rank++, left++;
  }
  printf("1 %d\n", rank);
  return 0;
}
