#include <bits/stdc++.h>
using namespace std;
int g_a[100100], g_b[100100];
int g_s[100100];
void update(int n, int v, int s) {
  while (n <= s) {
    g_s[n] += v;
    n += ((n) & (-(n)));
  }
}
int getsum(int n) {
  int s = 0;
  while (n) {
    s += g_s[n];
    n -= ((n) & (-(n)));
  }
  return s;
}
int search(int v, int n) {
  int low = 1, high = n;
  int mid;
  while (low <= high) {
    mid = (low + high) >> 1;
    if (g_b[mid] >= v) {
      high = mid - 1;
    } else
      low = mid + 1;
  }
  int gt = getsum(low - 1);
  int tmp;
  high = n;
  while (low <= high) {
    mid = (low + high) >> 1;
    tmp = getsum(mid);
    if (tmp > gt) {
      high = mid - 1;
    } else
      low = mid + 1;
  }
  return low;
}
int main() {
  int i, j, n, x;
  scanf("%d%d", &n, &x);
  for (i = 1; i <= n; i++) scanf("%d", g_a + i);
  for (i = 1; i <= n; i++) scanf("%d", g_b + i);
  int ind;
  sort(g_a + 1, g_a + n + 1);
  sort(g_b + 1, g_b + n + 1);
  int ans = 0;
  for (i = 1; i <= n; i++) g_s[i] = ((i) & (-(i)));
  for (i = 1; i <= n; i++) {
    ind = search(x - g_a[i], n);
    if (ind >= 1 && ind <= n) {
      update(ind, -1, n);
      ans++;
    }
  }
  printf("1 %d\n", ans);
}
