#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  while (scanf("%d%d", &n, &x) != EOF) {
    int a[100000], b[100000];
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
    }
    for (int i = 0; i < n; i++) {
      scanf("%d", &b[i]);
    }
    int a1[200001], b1[200001];
    for (int i = 0; i <= 200000; i++) {
      a1[i] = 0;
      b1[i] = 0;
    }
    for (int i = 0; i < n; i++) {
      a1[a[i]]++;
      b1[b[i]]++;
    }
    int p = -1, q = -1;
    for (int i = 200000; i >= 0; i--) {
      if (a1[i] > 0) {
        p = i;
        break;
      }
    }
    for (int i = 0; i <= 200000; i++) {
      if (b1[i] > 0 && p + i >= x) {
        q = i;
        break;
      }
    }
    int worst = 0;
    while (q >= 0 && q <= 200000 && p >= 0 && p <= 200000) {
      if (a1[p] > b1[q]) {
        worst += b1[q];
        a1[p] -= b1[q];
        b1[q] = 0;
        while (q <= 200000) {
          if (b1[q] > 0) {
            break;
          }
          q++;
        }
      } else if (a1[p] < b1[q]) {
        worst += a1[p];
        b1[q] -= a1[p];
        a1[p] = 0;
        while (p >= 0) {
          if (a1[p] > 0) {
            break;
          }
          p--;
        }
      } else {
        worst += a1[p];
        a1[p] = 0;
        b1[q] = 0;
        while (p >= 0) {
          if (a1[p] > 0) {
            break;
          }
          p--;
        }
        while (q <= 200000) {
          if (b1[q] > 0) {
            break;
          }
          q++;
        }
      }
      while (p + q < x) {
        b1[q] = 0;
        while (b1[q] == 0) {
          q++;
        }
      }
    }
    printf("1 %d\n", worst);
  }
  return 0;
}
