#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7fffffff;
int num1[100010], num2[100010];
int main() {
  int t, t1;
  int i, j, k;
  int m, n, sum;
  while (scanf("%d%d", &n, &m) != EOF) {
    sum = 0;
    for (i = 0; i < n; i++) scanf("%d", &num1[i]);
    sort(num1, num1 + n);
    for (i = 0; i < n; i++) scanf("%d", &num2[i]);
    sort(num2, num2 + n);
    i = 0;
    j = n - 1;
    while (i < n && j >= 0) {
      if (num1[i] + num2[j] >= m) {
        sum++;
        i++;
        j--;
      } else {
        i++;
      }
    }
    printf("1 %d\n", sum);
  }
  return 0;
}
