#include <bits/stdc++.h>
using namespace std;
int n, lim, pa, pb, ans, a[100000], b[100000];
int main() {
  scanf("%d%d", &n, &lim);
  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);
  for (pa = n - 1; pb < n;) {
    if (a[pa] + b[pb] >= lim) {
      pa--;
      pb++;
      ans++;
    } else
      pb++;
  }
  printf("1 %d\n", ans);
}
