#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, m, i, j, k, p, s = 0;
  cin >> x >> m;
  int n[x];
  for (i = 0; i < x; i++) {
    cin >> n[i];
    s = s + n[i];
  }
  sort(n, n + x);
  p = n[x - 1] * x;
  k = s + m;
  if (k <= p)
    cout << n[x - 1] << " " << n[x - 1] + m;
  else {
    j = k - p;
    if (j % x == 0)
      j = j / x;
    else
      j = j / x + 1;
    cout << n[x - 1] + j << " " << n[x - 1] + m;
  }
}
