#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 25;
vector<int> f;
vector<int> s;
int n, x;
map<int, int> mp;
int cnt[100005];
int main() {
  while (2 == scanf("%d%d", &n, &x)) {
    f.clear();
    s.clear();
    memset(cnt, 0, sizeof(cnt));
    int tmp;
    for (int i = 0; i < n; i++) {
      scanf("%d", &tmp);
      f.push_back(tmp);
    }
    for (int i = 0; i < n; i++) {
      scanf("%d", &tmp);
      s.push_back(tmp);
      cnt[tmp]++;
    }
    sort(f.begin(), f.end());
    sort(s.begin(), s.end());
    printf("1 ");
    int min_score = INF;
    int id = -1;
    for (int i = 0; i < n; i++) {
      int t = f[i];
      vector<int>::iterator it = lower_bound(s.begin(), s.end(), x - t);
      if (it != s.end()) {
        if (min_score > (*it + t)) {
          id = i;
          min_score = (*it + t);
        }
      }
    }
    vector<int>::iterator it =
        lower_bound(s.begin(), s.end(), min_score - f[id]);
    s.erase(it);
    int ans = 0;
    int id1 = 0;
    for (int i = n - 1; i >= 0; i--) {
      if (i != id) {
        int t = f[i];
        while (id1 < n - 1 && s[id1] + t < min_score) id1++;
        if (id1 >= n - 1) break;
        id1++;
        ans++;
      }
    }
    printf("%d\n", ans + 1);
  }
  return 0;
}
