#include <bits/stdc++.h>
using namespace std;
template <class T, class... S>
void dbs(string str, T t, S... s) {
  int idx = str.find(',');
  cout << str.substr(0, idx) << " : " << t << ",";
  dbs(str.substr(idx + 1), s...);
}
template <class S, class T>
ostream& operator<<(ostream& os, const pair<S, T>& p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& p) {
  os << "[ ";
  for (auto& it : p) os << it << " ";
  return os << "]";
}
template <class T>
ostream& operator<<(ostream& os, const set<T>& p) {
  os << "[ ";
  for (auto& it : p) os << it << " ";
  return os << "]";
}
template <class S, class T>
ostream& operator<<(ostream& os, const map<S, T>& p) {
  os << "[ ";
  for (auto& it : p) os << it << " ";
  return os << "]";
}
using namespace std;
int bestt(vector<int>& A, vector<int>& B, int X) {
  int N = A.size();
  int pt = 0;
  sort(A.begin(), A.end());
  sort(B.begin(), B.end());
  int ret = 0;
  for (int i = N - 1; i >= 0; i--) {
    while (pt < N && A[pt] + B[i] < X) {
      pt++;
    }
    if (pt == N) {
      break;
    }
    ret++;
    pt++;
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int N, X;
  cin >> N >> X;
  vector<int> A(N), B(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  for (int i = 0; i < N; i++) {
    cin >> B[i];
  }
  cout << "1 ";
  int best = -1;
  int indA = 0, indB = 0;
  sort(A.begin(), A.end());
  for (int i = 0; i < N; i++) {
    int req = X - B[i];
    int ind = lower_bound(A.begin(), A.end(), req) - A.begin();
    if (ind < N && A[ind] >= req) {
      if (best < A[ind] + B[i]) {
        best = A[ind] + B[i];
        indA = ind;
        indB = i;
      }
    }
  }
  vector<int> dA, dB;
  for (int i = 0; i < N; i++) {
    if (i != indA) {
      dA.push_back(A[i]);
    }
    if (i != indB) {
      dB.push_back(B[i]);
    }
  }
  cout << bestt(dA, dB, X) + 1 << endl;
  return 0;
}
