#include <bits/stdc++.h>
using namespace std;
bool com(int a, int b) { return a > b; }
int main() {
  int n, k;
  int a[100005], b[100005];
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 0; i < n; i++) scanf("%d", &b[i]);
  int cont = 0;
  sort(a, a + n);
  sort(b, b + n, com);
  for (int i = 0, j = 0; i < n; i++) {
    if (a[i] + b[j] >= k) {
      cont++;
      j++;
    }
  }
  printf("1 %d\n", cont);
  return 0;
}
