#include <bits/stdc++.h>
using namespace std;
long int a[100000], b[100000], n, x;
void enter() {
  scanf("%ld%ld", &n, &x);
  long int i;
  for (i = 0; i < n; ++i) scanf("%ld", &a[i]);
  for (i = 0; i < n; ++i) scanf("%ld", &b[i]);
}
void solve() {
  long int l = 0, r = n - 1, ans = 0;
  for (l = 0, r = n - 1; l < n && r >= 0; --r) {
    while (a[l] + b[r] < x && l < n) ++l;
    if (a[l] + b[r] >= x) ++ans;
    ++l;
  }
  printf("1 %ld", ans);
}
int main() {
  enter();
  sort(a, a + n);
  sort(b, b + n);
  solve();
}
