#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 100;
int cmp(int i, int j) { return i > j; }
int main() {
  int n, x;
  while (cin >> n >> x) {
    int an[maxn], bn[maxn];
    for (int i = 0; i < n; i++) scanf("%d", &an[i]);
    for (int i = 0; i < n; i++) scanf("%d", &bn[i]);
    sort(an, an + n);
    sort(bn, bn + n, cmp);
    int w = 0;
    for (int i = 0, j = 0; i < n && j < n; i++) {
      if (an[i] + bn[j] >= x) {
        w++;
        j++;
      }
    }
    printf("1 %d\n", w);
  }
  return 0;
}
