#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N], b[N];
int main() {
  int n, ans = 0, x;
  cin >> n >> x;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cin >> b[i];
  sort(a + 1, a + 1 + n);
  sort(b + 1, b + 1 + n);
  for (int i = 1, j = n; i <= n && j >= 1; i++) {
    if (a[i] + b[j] >= x) ans++, j--;
  }
  cout << "1 " << ans;
}
