#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  vector<int> vec(n);
  for (int i = 0; i < n; ++i) cin >> vec[i];
  sort(vec.begin(), vec.end());
  int curTop = vec[n - 1];
  int min_k, max_k;
  max_k = vec[n - 1] + m;
  for (int i = 0; i < n; ++i) m -= (curTop - vec[i]), vec[i] = curTop;
  min_k = curTop;
  if (m > 0) {
    if (m % n == 0)
      min_k += m / n;
    else
      min_k += (m / n + 1);
  }
  cout << min_k << " " << max_k << "\n";
  return 0;
}
