#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s;
  scanf("%d%d", &n, &s);
  vector<int> a, b;
  int i, x;
  for (i = 0; i < n; i++) {
    scanf("%d", &x);
    a.push_back(x);
  }
  for (i = 0; i < n; i++) {
    scanf("%d", &x);
    b.push_back(x);
  }
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  vector<int> c;
  int j = n - 1;
  for (i = 0; i < n; i++) {
    while (a[i] + b[j] >= s) {
      j--;
      if (j == 0) break;
    }
    if (j == 0) break;
  }
  int ti = 0;
  int las = n - 1;
  for (i = j; i < n; i++)
    if (a[las] + b[i] >= s) {
      las--;
      ti++;
    }
  printf("1 %d\n", ti);
  return 0;
}
