#include <bits/stdc++.h>
using namespace std;
int n, x, data[2][100005];
int main() {
  scanf("%d%d", &n, &x);
  for (int i = 0; i < n; i++) scanf("%d", &data[0][i]);
  for (int i = 0; i < n; i++) scanf("%d", &data[1][i]);
  sort(data[0], data[0] + n);
  sort(data[1], data[1] + n);
  int ans = 0;
  for (int i = 0, j = n - 1; i < n; i++) {
    if (data[0][i] + data[1][j] < x) continue;
    j--;
    ans++;
  }
  printf("%d %d\n", 1, ans);
}
