#include <bits/stdc++.h>
int n, x, l, r, lr, y, t, ans;
int numa[1000000], numb[1000000];
int main() {
  int i, j, k;
  scanf("%d%d", &n, &x);
  for (i = 1; i <= n; i++) {
    scanf("%d", &numa[i]);
  }
  for (i = 1; i <= n; i++) {
    scanf("%d", &numb[i]);
  }
  std::sort(numa + 1, numa + 1 + n);
  std::sort(numb + 1, numb + 1 + n);
  t = 1;
  for (i = n; i >= 1; i--) {
    y = x - numa[i];
    while (1) {
      if (y <= numb[t]) {
        t++;
        if (t == n + 1) {
          ans = n - i + 1;
          goto ccc;
        }
        break;
      } else {
        t++;
        if (t == n + 1) {
          ans = n - i;
          goto ccc;
        }
      }
    }
  }
ccc:
  printf("1 %d\n", ans);
  getchar();
  getchar();
}
