#include <bits/stdc++.h>
using namespace std;
double dis(int x1, int y1, int x2, int y2) {
  return sqrt((powl((x1 - x2), 2)) + (powl((y1 - y2), 2)));
}
bool com(pair<int, int> x1, pair<int, int> x2) {
  if (x1.first == x2.first)
    return x1.second < x2.second;
  else
    return x1.first < x2.first;
}
const int mod = 1000000007;
long long int modPow(long long int a, long long int x, long long int p) {
  long long int res = 1;
  while (x > 0) {
    if (x & 1) res = (res * a) % p;
    a = (a * a) % p;
    x >>= 1;
  }
  return res;
}
long long int modInverse(long long int a, long long int p) {
  return modPow(a, p - 2, p);
}
long long int c(long long int n, long long int k, long long int p) {
  long long int numerator = 1;
  int i;
  for (i = 0; i < k; i++) numerator = (numerator * (n - i)) % p;
  long long int denominator = 1;
  for (i = 1; i <= k; i++) denominator = (denominator * i) % p;
  long long int res = modInverse(denominator, p);
  res = (res * numerator) % p;
  return res;
}
bool com1(pair<int, int> x, pair<int, int> y) { return x.first > y.first; }
vector<pair<long long int, long long int> > v;
long long int SumPre[500005];
void bns(int s, long long int k) {
  long long int l = v.size() - 1;
  long long int ct = 0;
  long long int s1 = s;
  while (s < l) {
    if (ct++ > 60) break;
    int mid = (l + s + 1) >> 1;
    if (v[s1].first * (mid - s1) - (SumPre[mid] - SumPre[s1]) <= k) {
      v[s1].second = max(v[s1].second, mid - s1 + 1);
      s = mid;
    } else
      l = mid - 1;
  }
}
int main() {
  int n, k;
  long long int maxx = 0, index = 0;
  cin >> n >> k;
  for (int i = int(0); i <= int(n - 1); i++) {
    int x;
    cin >> x;
    v.push_back(make_pair(x, 1));
  }
  sort(v.begin(), v.end(), com1);
  SumPre[0] = v[0].first;
  for (int i = int(1); i <= int(n - 1); i++)
    SumPre[i] += v[i].first + SumPre[i - 1];
  for (int i = int(0); i <= int(n - 1); i++) bns(i, k);
  for (int i = int(0); i <= int(n - 1); i++) {
    if (maxx < v[i].second) {
      maxx = v[i].second;
      index = i;
    }
    if (maxx == v[i].second && v[i].first < v[index].first) index = i;
  }
  cout << v[index].second << " " << v[index].first;
}
