#include <bits/stdc++.h>
using namespace std;
bool cmp(int a, int b) { return a > b; }
int n, x;
int a[211111];
int b[211111];
int check(int t) {
  int cnt = 1;
  int i;
  for (i = t; i >= 1; i--)
    if (a[i] + b[cnt] < x)
      return 0;
    else
      cnt++;
  return 1;
}
int main() {
  int i;
  scanf("%d%d", &n, &x);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= n; i++) scanf("%d", &b[i]);
  sort(a + 1, a + 1 + n, cmp);
  sort(b + 1, b + 1 + n, cmp);
  int l = 1, r = n;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (check(mid))
      l = mid + 1;
    else
      r = mid - 1;
  }
  printf("1 %d\n", l - 1);
}
