#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, i;
  int x[100010], y[100010];
  scanf("%d %d", &n, &a);
  for (i = 0; i < n; ++i) scanf("%d", &x[i]);
  for (i = 0; i < n; ++i) scanf("%d", &y[i]);
  sort(x, x + n);
  sort(y, y + n);
  int ans = 0;
  int l = 0;
  int r = n - 1;
  while (r >= 0) {
    while (x[l] + y[r] < a && l < n - 1) ++l;
    if (x[l] + y[r] >= a && l < n) {
      ++ans;
      ++l;
    }
    --r;
  }
  printf("%d %d\n", 1, ans);
  return 0;
}
