#include <bits/stdc++.h>
using namespace std;
bool cmp1(int a, int b) { return a > b; }
bool cmp2(int a, int b) { return a < b; }
int num1[100005], num2[100005];
int main() {
  int n, x, now, m = 0;
  bool f, gg = 1;
  cin >> n >> x;
  for (int i = 0; i < n; i++) {
    scanf("%d", num1 + i);
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", num2 + i);
  }
  cout << "1 ";
  sort(num1, num1 + n, cmp1);
  sort(num2, num2 + n, cmp2);
  for (int i = 0; i < n; i++) {
    f = 1;
    for (int j = m; j < n; j++) {
      if (num1[i] + num2[j] >= x) {
        m = j + 1;
        f = 0;
        break;
      }
    }
    if (f) {
      cout << i << endl;
      gg = 0;
      break;
    }
  }
  if (gg) cout << n << endl;
  return 0;
}
