#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int a[MAXN], b[MAXN];
int main() {
  int m, n, i, j, k;
  scanf("%d%d", &m, &n);
  for (i = 1; i <= m; i++) scanf("%d", &a[i]);
  multiset<int> s;
  multiset<int>::iterator it;
  for (i = 1; i <= m; i++) {
    scanf("%d", &b[i]);
    s.insert(b[i]);
  }
  sort(a + 1, a + 1 + m);
  reverse(a + 1, a + 1 + m);
  vector<int> v;
  for (i = 1; i <= m; i++) {
    int f = n - a[i];
    it = s.lower_bound(f);
    if (it == s.end()) it--;
    v.push_back(abs(a[i] + *it));
    s.erase(it);
  }
  int ans = 0;
  for (i = 0; i < v.size(); i++)
    if (v[i] >= n) ans++;
  cout << 1 << ' ' << ans << endl;
}
