#include <bits/stdc++.h>
using namespace std;
struct node {
  int t, n;
} a[200005];
int cmp(const void* a, const void* b) {
  node* aa = (node*)a;
  node* bb = (node*)b;
  if (aa->n > bb->n) {
    return 1;
  } else if (aa->n == bb->n) {
    return bb->t - aa->t;
  } else {
    return -1;
  }
}
int main() {
  int n, k;
  while (~scanf("%d%d", &n, &k)) {
    int i;
    for (i = 0; i < n; i++) {
      scanf("%d", &a[i].n);
      a[i].t = 1;
    }
    for (i = 0; i < n; i++) {
      scanf("%d", &a[i + n].n);
      a[i + n].n = k - a[i + n].n;
      a[i + n].t = 2;
    }
    int s1 = 0, s2 = 0;
    qsort(a, 2 * n, sizeof(a[0]), cmp);
    for (i = 0; i < 2 * n; i++) {
      if (a[i].t == 2) {
        s2++;
      } else {
        if (s2) {
          s2--;
          s1++;
        }
      }
    }
    printf("1 %d\n", s1);
  }
  return 0;
}
