#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
int n;
int x;
int P[N];
int F[N];
bool bio[N];
bool bio2[N];
inline void load() {
  scanf("%d %d", &n, &x);
  for (int i = 0; i < n; i++) scanf("%d", &P[i]);
  for (int i = 0; i < n; i++) scanf("%d", &F[i]);
}
inline void solve() {
  sort(P, P + n);
  sort(F, F + n);
  int pt1 = 0;
  int sol = 0;
  for (int i = 0; i < n; i++) {
    while (pt1 < n && P[i] + F[pt1] < x) pt1++;
    if (pt1 < n) sol++, bio[i] = true, bio2[pt1] = true;
    pt1++;
  }
  pt1 = 0;
  int sol2 = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (bio2[i]) continue;
    while (pt1 < n && F[i] + P[pt1] < x) pt1++;
    while (bio[pt1] && pt1 < n) pt1++;
    if (pt1 < n) sol2++;
    pt1++;
  }
  printf("%d %d\n", 1, sol + sol2);
}
int main(void) {
  load();
  solve();
  return 0;
}
