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