#include <bits/stdc++.h>
using namespace std;
int a[100010], b[100010];
int main() {
  int n, x, pst, 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;
    pst = 0;
    for (int i = n - 1; i >= 0; i--) {
      if (pst == n) break;
      while (pst < n) {
        pst += 1;
        if (b[pst - 1] + a[i] >= x) {
          ans += 1;
          break;
        }
      }
    }
    printf("1 %d\n", ans);
  }
  return 0;
}
