#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);
  reverse(a, a + n);
  reverse(b, b + n);
  int i = 0, j = n - 1, ans = 0;
  while (i < n && j >= 0) {
    if (a[i] + b[j] >= x) ++i, ++ans;
    --j;
  }
  printf("1 %d\n", ans);
  return 0;
}
