#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned int n = 0, m = 0, kmax = 0;
  float kmin = 0;
  cin >> n;
  cin >> m;
  int* benches = new int[n + 1];
  for (int i = 0; i < n; i++) {
    cin >> benches[i];
    kmin += benches[i];
    if (benches[i] >= kmax) {
      kmax = benches[i];
    }
  }
  kmin = ceil((kmin + m) / n);
  if (kmin < kmax) {
    kmin = kmax;
  }
  cout << kmin << " " << kmax + m << endl;
  return 0;
}
