#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
int main() {
  ios::sync_with_stdio(false);
  int n;
  int x;
  int a[100005] = {0};
  int b[100005] = {0};
  while (cin >> n >> x) {
    memset(a, 0, sizeof(a));
    memset(b, 0, sizeof(b));
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    for (int i = 0; i < n; i++) {
      cin >> b[i];
    }
    sort(a, a + n);
    sort(b, b + n);
    int cnt = n - 1;
    int ans = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] + b[cnt] >= x) {
        cnt--;
      }
    }
    ans = n - 1 - cnt;
    cnt = n - 1;
    for (int i = 0; i < n; i++) {
      if (b[i] + a[cnt] >= x) {
        cnt--;
      }
    }
    ans = max(ans, n - cnt - 1);
    cout << "1 " << ans << endl;
  }
  return 0;
}
