#include <bits/stdc++.h>
using namespace std;
int a1[100000];
int a2[100000];
int main() {
  multiset<int> a1;
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a1.insert(x);
  }
  for (int i = 0; i < n; i++) cin >> a2[i];
  sort(a2, a2 + n);
  cout << "1 ";
  int left = 0;
  int right = 0;
  int count = 0;
  for (int i = 0; i < n; i++) {
    int val = m - a2[i];
    if (val < 0) val = 0;
    multiset<int>::iterator index = a1.lower_bound(val);
    if (index != a1.end()) {
      count++;
      a1.erase(index);
    }
  }
  cout << count << endl;
}
