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