#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
const long long LLINF = 9223372036854775807LL;
const int maxn = 100010;
int a[maxn];
int b[maxn];
int main() {
  int n, x;
  scanf("%d%d", &n, &x);
  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);
  reverse(a, a + n);
  sort(b, b + n);
  reverse(b, b + n);
  int l = -1;
  int r = n + 1;
  while (r - l > 1) {
    int m = (l + r) >> 1;
    bool ok = true;
    for (int i = 0; i < m; ++i)
      if (a[i] + b[m - 1 - i] < x) ok = false;
    if (ok)
      l = m;
    else
      r = m;
  }
  printf("%d %d\n", 1, l);
  return 0;
}
