#include <bits/stdc++.h>
using namespace std;
bool cmp(int u, int y) { return u > y; }
int main() {
  int i, j;
  int n, m, x;
  int a[100009], b[100009];
  int cnt;
  while (scanf("%d %d", &n, &x) != EOF) {
    for (i = 0; i < n; i++) scanf("%d", &a[i]);
    sort(a, a + n, cmp);
    for (i = 0; i < n; i++) scanf("%d", &b[i]);
    sort(b, b + n);
    cnt = 0;
    int k = 0;
    for (i = 0; i < n; i++) {
      for (j = k; j < n; j++) {
        if (a[i] != -0x3fffffff && b[j] != -0x3fffffff) {
          if (a[i] + b[j] >= x) {
            a[i] = -0x3fffffff;
            b[j] = -0x3fffffff;
            cnt++;
            k = j;
            break;
          }
        }
      }
    }
    printf("1 %d\n", cnt);
  }
}
