#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, A[101], maxx = 0, sum = 0;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  for (int i = 0; i < n; i++) {
    maxx = max(maxx, A[i]);
    sum += A[i];
  }
  int d, l, b, c;
  b = maxx + m;
  d = (n - 1) * maxx;
  l = m + sum - maxx;
  if (d <= l) {
    c = ceil(float(sum + m) / n);
    cout << c << " " << b << '\n';
  } else {
    cout << maxx << " " << b << '\n';
  }
  return 0;
}
