#include <bits/stdc++.h>
using namespace std;
long long n, k, arr[100100], a, b;
pair<long long, long long> ans;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> arr[i], arr[i] += 1000000000;
  sort(arr, arr + n);
  a = b = n - 1;
  while (b >= 0) {
    while (a != -1 && k >= arr[b] - arr[a]) {
      k -= arr[b] - arr[a];
      a--;
    }
    if (b - a >= ans.first) ans.first = b - a, ans.second = arr[b];
    if (a < b) k += (arr[b] - arr[b - 1]) * (b - a - 1);
    b--;
    a = min(a, b);
  }
  cout << ans.first << " " << ans.second - 1000000000;
}
