#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
int main() {
  int n, x, a[100009], b[100009], y, z;
  scanf("%d %d", &n, &x);
  y = 1;
  z = 0;
  for (int i = 1; i < n + 1; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 1; i < n + 1; i++) {
    scanf("%d", &b[i]);
  }
  sort(a + 1, a + n + 1);
  sort(b + 1, b + n + 1);
  int j = n;
  for (int i = 1; i < n + 1; i++) {
    if (a[j] + b[i] > x - 1) {
      j--;
      z++;
    }
  }
  printf("%d %d\n", y, z);
}
