#include <bits/stdc++.h>
using namespace std;
int N, X, ans;
int A[100002];
int B[100002];
int main() {
  scanf("%d%d", &N, &X);
  for (int i = 1; i <= N; i++) scanf("%d", &A[i]);
  for (int i = 1; i <= N; i++) scanf("%d", &B[i]);
  sort(A + 1, A + N + 1);
  sort(B + 1, B + N + 1);
  for (int i = 1, j = N; i <= N && j >= 1; i++)
    if (A[i] + B[j] >= X) j--, ans++;
  printf("1 %d\n", ans);
  return 0;
}
