#include <bits/stdc++.h>
inline int Rand() { return (rand() << 16) | rand(); }
using namespace std;
int n;
long long k;
long long a[200500], d[200500];
pair<long long, long long> ans;
long long get(int pos, int i) {
  long long val = a[i] * 1LL * (i - pos);
  return val - (d[i - 1] - d[pos - 1]);
}
bool compare(pair<long long, long long> val, pair<long long, long long> res) {
  if (val.first < res.first) return false;
  if (val.first == res.first) {
    if (val.second >= res.second)
      return false;
    else
      return true;
  }
  return true;
}
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) d[i] = d[i - 1] + a[i];
  for (int i = 1; i <= n; i++) {
    int l = 1, r = i - 1;
    while (l <= r) {
      int mid = (l + r) / 2;
      long long opr = get(mid, i);
      if (opr <= k) {
        if (!compare(ans, make_pair(i - mid + 1, a[i])))
          ans = make_pair(i - mid + 1, a[i]);
        r = mid - 1;
      } else
        l = mid + 1;
    }
    if (!compare(ans, make_pair(1, a[i]))) ans = make_pair(1, a[i]);
  }
  cout << ans.first << " " << ans.second;
  return 0;
}
