#include <bits/stdc++.h>
int mySearch(const std::vector<int> &sequence, int *l, int *r, int min_val) {
  int cl = *l;
  int cr = *r;
  if (sequence[cr] < min_val) {
    *l = *r + 1;
    return 0;
  }
  while (cr != cl) {
    int cm = (cr + cl) / 2;
    if (sequence[cm] >= min_val) {
      cr = cm;
    } else {
      cl = cm + 1;
    }
  }
  *l = cl + 1;
  return 1;
}
int main() {
  int size, min_rate;
  std::vector<int> first_sequence, second_sequence;
  std::cin >> size >> min_rate;
  int tmp;
  for (int i = 0; i < size; ++i) {
    std::cin >> tmp;
    first_sequence.push_back(tmp);
  }
  for (int i = 0; i < size; ++i) {
    std::cin >> tmp;
    second_sequence.push_back(tmp);
  }
  std::sort(first_sequence.begin(), first_sequence.end());
  std::sort(second_sequence.begin(), second_sequence.end());
  int l_first = 0;
  int r_first = size - 1;
  int l_second = 0;
  int r_second = size - 1;
  int magic_count = 0;
  int cc;
  while ((r_first - l_first) >= 0 && (r_second - l_second) >= 0) {
    if (first_sequence[r_first] > second_sequence[r_second]) {
      cc = mySearch(second_sequence, &l_second, &r_second,
                    min_rate - first_sequence[r_first]);
      --r_first;
    } else {
      cc = mySearch(first_sequence, &l_first, &r_first,
                    min_rate - second_sequence[r_second]);
      --r_second;
    }
    magic_count += cc;
  }
  std::cout << 1 << " " << magic_count;
  return 0;
}
