#include <bits/stdc++.h>
using namespace std;
inline long long gcd(long long x, long long y) { return x ? gcd(y % x, x) : y; }
const long long mod = 998244353;
inline signed rd() {
  signed ans = 0;
  char last = ' ', ch = getchar();
  while (!(ch >= '0' && ch <= '9')) last = ch, ch = getchar();
  while (ch >= '0' && ch <= '9')
    ans = (ans << 3) + (ans << 1) + ch - '0', ch = getchar();
  return ans;
}
inline long long QPow(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return ans;
}
inline long long QPow(long long a, long long b, const long long &mod) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return ans;
}
long long exgcd(long long a, long long b, long long &x, long long &y) {
  long long d = a;
  if (b == 0)
    x = 1, y = 0;
  else {
    d = exgcd(b, a % b, y, x), y -= a / b * x;
  }
  return d;
}
const long double PI = 3.141592653589793115997963468544185161590576171875;
const long long maxn = 300005;
long long a[maxn], b[maxn];
bool used[maxn];
signed main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n, m, u, v, r, x, w, q, i, j, k;
  cin >> n >> x;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  for (long long i = 1; i <= n; i++) cin >> b[i];
  cout << 1 << ' ';
  sort(a + 1, a + 1 + n);
  sort(b + 1, b + 1 + n);
  signed ptr = 0;
  long long ans = 0;
  for (long long i = n; i >= 1; i--) {
    signed id = lower_bound(b + 1, b + 1 + n, x - a[i]) - b;
    ptr = max(ptr, id);
    while (ptr <= n && used[ptr]) ptr++;
    used[ptr] = 1;
    if (ptr <= n) ans++;
  }
  cout << ans << endl;
  return 0;
}
