#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:1024000000,1024000000")
const int Max = 100000;
int a[Max + 10];
int b[Max + 10];
int c[Max + 10];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  srand(__rdtsc());
  int n, x;
  cin >> n >> x;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  sort(a, a + n);
  reverse(a, a + n);
  sort(b, b + n);
  a[n] = 100000000;
  b[n] = 1000000000;
  {
    int il = 0;
    int jl = 0;
    int jll = 0;
    int k = 0;
    int x2 = x / 2;
    bool f = 1;
    {
      while (a[il] >= x2 && b[jl] <= x2) {
        f = 0;
        while (b[jl] <= x2 && a[il] + b[jl] < x) jl++;
        if (b[jl] <= x2 && a[il] + b[jl] >= x) {
          k++;
          il++;
          jl++;
          jll = jl;
          f = 1;
        }
      }
      if (!f) jl = jll;
      int i = n - 1;
      int j = n - 1;
      while (i >= il && j >= jl) {
        while (i >= il && a[i] + b[j] < x) i--;
        if (i >= il && a[i] + b[j] >= x) {
          k++;
          i--;
          j--;
        }
      }
    }
    cout << "1 " << k << endl;
  }
  return 0;
}
