#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long int dx[] = {0, 0, 1, -1};
long long int dy[] = {1, -1, 0, 0};
long long int m = 1e9 + 9, n, res, k, ans = 0, nbcycle = 0;
string s2 = "zero", ch = "", s;
set<long long int> st;
vector<pair<string, long long int> > vm;
vector<pair<long long int, pair<long long int, long long int> > > vvv;
vector<pair<long long int, long long int> > vv, vv2;
vector<string> v2;
vector<long long int> vans;
long long int a[300005], b[300005];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long int i = 0, x = 0, y = 0, j = 0, z, q, nb0 = 0, nbp = 0, nbn = 0,
                nbmax = 0, nbinf = 0, mm = 5e8, idx = 0, ok = 0, l = 0, r = 0,
                negatif = 0, positif = 0, l1, r1, d;
  set<long long int>::iterator it, it1;
  char c;
  cin >> n >> m;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (i = 1; i <= n; i++) {
    cin >> x;
    b[x]++;
    st.insert(x);
  }
  sort(a + 1, a + 1 + n);
  cout << "1 ";
  for (i = n; i >= 1; i--) {
    it = st.lower_bound(m - a[i]);
    if (it == st.end()) {
      return cout << (n - i), 0;
    }
    y = (*it);
    b[y]--;
    st.erase(st.find(y));
    if (b[y]) st.insert(y);
  }
  cout << n << endl;
  return 0;
}
