#include <bits/stdc++.h>
using namespace std;
int n, x, ans = 0;
vector<int> a, b;
bool cmp(const int &a, const int &b) { return a > b; }
int main(int argc, char *argv[]) {
  scanf("%d%d", &n, &x);
  a.resize(n);
  b.resize(n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
  }
  for (int i = 0; i < n; ++i) {
    scanf("%d", &b[i]);
  }
  sort(a.begin(), a.end(), cmp);
  sort(b.begin(), b.end(), cmp);
  for (int i = 0, j = n - 1; i < n && j >= 0; ++i) {
    for (; j >= 0 && a[i] + b[j] < x; --j)
      ;
    if (j >= 0) {
      ++ans;
    }
    --j;
  }
  printf("1 %d", ans);
  return 0;
}
